public class ModifyImageAttributeRequest extends AmazonWebServiceRequest implements java.io.Serializable, java.lang.Cloneable, DryRunSupportedRequest<ModifyImageAttributeRequest>
Contains the parameters for ModifyImageAttribute.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
attribute
The name of the attribute to modify.
|
private java.lang.String |
description
A description for the AMI.
|
private java.lang.String |
imageId
The ID of the AMI.
|
private LaunchPermissionModifications |
launchPermission
A launch permission modification.
|
private java.lang.String |
operationType
The operation type.
|
private SdkInternalList<java.lang.String> |
productCodes
One or more product codes.
|
private SdkInternalList<java.lang.String> |
userGroups
One or more user groups.
|
private SdkInternalList<java.lang.String> |
userIds
One or more AWS account IDs.
|
private java.lang.String |
value
The value of the attribute being modified.
|
NOOP
Constructor and Description |
---|
ModifyImageAttributeRequest()
Default constructor for ModifyImageAttributeRequest object.
|
ModifyImageAttributeRequest(java.lang.String imageId,
java.lang.String attribute)
Constructs a new ModifyImageAttributeRequest object.
|
Modifier and Type | Method and Description |
---|---|
ModifyImageAttributeRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAttribute()
The name of the attribute to modify.
|
java.lang.String |
getDescription()
A description for the AMI.
|
Request<ModifyImageAttributeRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
java.lang.String |
getImageId()
The ID of the AMI.
|
LaunchPermissionModifications |
getLaunchPermission()
A launch permission modification.
|
java.lang.String |
getOperationType()
The operation type.
|
java.util.List<java.lang.String> |
getProductCodes()
One or more product codes.
|
java.util.List<java.lang.String> |
getUserGroups()
One or more user groups.
|
java.util.List<java.lang.String> |
getUserIds()
One or more AWS account IDs.
|
java.lang.String |
getValue()
The value of the attribute being modified.
|
int |
hashCode() |
void |
setAttribute(java.lang.String attribute)
The name of the attribute to modify.
|
void |
setDescription(java.lang.String description)
A description for the AMI.
|
void |
setImageId(java.lang.String imageId)
The ID of the AMI.
|
void |
setLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.
|
void |
setOperationType(OperationType operationType)
The operation type.
|
void |
setOperationType(java.lang.String operationType)
The operation type.
|
void |
setProductCodes(java.util.Collection<java.lang.String> productCodes)
One or more product codes.
|
void |
setUserGroups(java.util.Collection<java.lang.String> userGroups)
One or more user groups.
|
void |
setUserIds(java.util.Collection<java.lang.String> userIds)
One or more AWS account IDs.
|
void |
setValue(java.lang.String value)
The value of the attribute being modified.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ModifyImageAttributeRequest |
withAttribute(java.lang.String attribute)
The name of the attribute to modify.
|
ModifyImageAttributeRequest |
withDescription(java.lang.String description)
A description for the AMI.
|
ModifyImageAttributeRequest |
withImageId(java.lang.String imageId)
The ID of the AMI.
|
ModifyImageAttributeRequest |
withLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.
|
ModifyImageAttributeRequest |
withOperationType(OperationType operationType)
The operation type.
|
ModifyImageAttributeRequest |
withOperationType(java.lang.String operationType)
The operation type.
|
ModifyImageAttributeRequest |
withProductCodes(java.util.Collection<java.lang.String> productCodes)
One or more product codes.
|
ModifyImageAttributeRequest |
withProductCodes(java.lang.String... productCodes)
One or more product codes.
|
ModifyImageAttributeRequest |
withUserGroups(java.util.Collection<java.lang.String> userGroups)
One or more user groups.
|
ModifyImageAttributeRequest |
withUserGroups(java.lang.String... userGroups)
One or more user groups.
|
ModifyImageAttributeRequest |
withUserIds(java.util.Collection<java.lang.String> userIds)
One or more AWS account IDs.
|
ModifyImageAttributeRequest |
withUserIds(java.lang.String... userIds)
One or more AWS account IDs.
|
ModifyImageAttributeRequest |
withValue(java.lang.String value)
The value of the attribute being modified.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
private java.lang.String imageId
The ID of the AMI.
private java.lang.String attribute
The name of the attribute to modify.
private java.lang.String operationType
The operation type.
private SdkInternalList<java.lang.String> userIds
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.
private SdkInternalList<java.lang.String> userGroups
One or more user groups. This is only valid when modifying the
launchPermission
attribute.
private SdkInternalList<java.lang.String> productCodes
One or more product codes. After you add a product code to an AMI, it
can't be removed. This is only valid when modifying the
productCodes
attribute.
private java.lang.String value
The value of the attribute being modified. This is only valid when
modifying the description
attribute.
private LaunchPermissionModifications launchPermission
A launch permission modification.
private java.lang.String description
A description for the AMI.
public ModifyImageAttributeRequest()
public ModifyImageAttributeRequest(java.lang.String imageId, java.lang.String attribute)
imageId
- The ID of the AMI.attribute
- The name of the attribute to modify.public void setImageId(java.lang.String imageId)
The ID of the AMI.
imageId
- The ID of the AMI.public java.lang.String getImageId()
The ID of the AMI.
public ModifyImageAttributeRequest withImageId(java.lang.String imageId)
The ID of the AMI.
imageId
- The ID of the AMI.public void setAttribute(java.lang.String attribute)
The name of the attribute to modify.
attribute
- The name of the attribute to modify.public java.lang.String getAttribute()
The name of the attribute to modify.
public ModifyImageAttributeRequest withAttribute(java.lang.String attribute)
The name of the attribute to modify.
attribute
- The name of the attribute to modify.public void setOperationType(java.lang.String operationType)
The operation type.
operationType
- The operation type.OperationType
public java.lang.String getOperationType()
The operation type.
OperationType
public ModifyImageAttributeRequest withOperationType(java.lang.String operationType)
The operation type.
operationType
- The operation type.OperationType
public void setOperationType(OperationType operationType)
The operation type.
operationType
- The operation type.OperationType
public ModifyImageAttributeRequest withOperationType(OperationType operationType)
The operation type.
operationType
- The operation type.OperationType
public java.util.List<java.lang.String> getUserIds()
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.
launchPermission
attribute.public void setUserIds(java.util.Collection<java.lang.String> userIds)
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.
userIds
- One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.public ModifyImageAttributeRequest withUserIds(java.lang.String... userIds)
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.
NOTE: This method appends the values to the existing list (if
any). Use setUserIds(java.util.Collection)
or
withUserIds(java.util.Collection)
if you want to override the
existing values.
userIds
- One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.public ModifyImageAttributeRequest withUserIds(java.util.Collection<java.lang.String> userIds)
One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.
userIds
- One or more AWS account IDs. This is only valid when modifying the
launchPermission
attribute.public java.util.List<java.lang.String> getUserGroups()
One or more user groups. This is only valid when modifying the
launchPermission
attribute.
launchPermission
attribute.public void setUserGroups(java.util.Collection<java.lang.String> userGroups)
One or more user groups. This is only valid when modifying the
launchPermission
attribute.
userGroups
- One or more user groups. This is only valid when modifying the
launchPermission
attribute.public ModifyImageAttributeRequest withUserGroups(java.lang.String... userGroups)
One or more user groups. This is only valid when modifying the
launchPermission
attribute.
NOTE: This method appends the values to the existing list (if
any). Use setUserGroups(java.util.Collection)
or
withUserGroups(java.util.Collection)
if you want to override the
existing values.
userGroups
- One or more user groups. This is only valid when modifying the
launchPermission
attribute.public ModifyImageAttributeRequest withUserGroups(java.util.Collection<java.lang.String> userGroups)
One or more user groups. This is only valid when modifying the
launchPermission
attribute.
userGroups
- One or more user groups. This is only valid when modifying the
launchPermission
attribute.public java.util.List<java.lang.String> getProductCodes()
One or more product codes. After you add a product code to an AMI, it
can't be removed. This is only valid when modifying the
productCodes
attribute.
productCodes
attribute.public void setProductCodes(java.util.Collection<java.lang.String> productCodes)
One or more product codes. After you add a product code to an AMI, it
can't be removed. This is only valid when modifying the
productCodes
attribute.
productCodes
- One or more product codes. After you add a product code to an AMI,
it can't be removed. This is only valid when modifying the
productCodes
attribute.public ModifyImageAttributeRequest withProductCodes(java.lang.String... productCodes)
One or more product codes. After you add a product code to an AMI, it
can't be removed. This is only valid when modifying the
productCodes
attribute.
NOTE: This method appends the values to the existing list (if
any). Use setProductCodes(java.util.Collection)
or
withProductCodes(java.util.Collection)
if you want to override
the existing values.
productCodes
- One or more product codes. After you add a product code to an AMI,
it can't be removed. This is only valid when modifying the
productCodes
attribute.public ModifyImageAttributeRequest withProductCodes(java.util.Collection<java.lang.String> productCodes)
One or more product codes. After you add a product code to an AMI, it
can't be removed. This is only valid when modifying the
productCodes
attribute.
productCodes
- One or more product codes. After you add a product code to an AMI,
it can't be removed. This is only valid when modifying the
productCodes
attribute.public void setValue(java.lang.String value)
The value of the attribute being modified. This is only valid when
modifying the description
attribute.
value
- The value of the attribute being modified. This is only valid when
modifying the description
attribute.public java.lang.String getValue()
The value of the attribute being modified. This is only valid when
modifying the description
attribute.
description
attribute.public ModifyImageAttributeRequest withValue(java.lang.String value)
The value of the attribute being modified. This is only valid when
modifying the description
attribute.
value
- The value of the attribute being modified. This is only valid when
modifying the description
attribute.public void setLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.
launchPermission
- A launch permission modification.public LaunchPermissionModifications getLaunchPermission()
A launch permission modification.
public ModifyImageAttributeRequest withLaunchPermission(LaunchPermissionModifications launchPermission)
A launch permission modification.
launchPermission
- A launch permission modification.public void setDescription(java.lang.String description)
A description for the AMI.
description
- A description for the AMI.public java.lang.String getDescription()
A description for the AMI.
public ModifyImageAttributeRequest withDescription(java.lang.String description)
A description for the AMI.
description
- A description for the AMI.public Request<ModifyImageAttributeRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<ModifyImageAttributeRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ModifyImageAttributeRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()