Class GrantListEntry
- java.lang.Object
-
- com.amazonaws.services.kms.model.GrantListEntry
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class GrantListEntry extends Object implements Serializable, Cloneable
Contains information about an entry in a list of grants.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GrantListEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GrantListEntry
clone()
boolean
equals(Object obj)
GrantConstraints
getConstraints()
The conditions under which the grant's operations are allowed.Date
getCreationDate()
The date and time when the grant was created.String
getGranteePrincipal()
The principal that receives the grant's permissions.String
getGrantId()
The unique identifier for the grant.String
getIssuingAccount()
The AWS account under which the grant was issued.String
getKeyId()
The unique identifier for the customer master key (CMK) to which the grant applies.String
getName()
The friendly name that identifies the grant.List<String>
getOperations()
The list of operations permitted by the grant.String
getRetiringPrincipal()
The principal that can retire the grant.int
hashCode()
void
setConstraints(GrantConstraints constraints)
The conditions under which the grant's operations are allowed.void
setCreationDate(Date creationDate)
The date and time when the grant was created.void
setGranteePrincipal(String granteePrincipal)
The principal that receives the grant's permissions.void
setGrantId(String grantId)
The unique identifier for the grant.void
setIssuingAccount(String issuingAccount)
The AWS account under which the grant was issued.void
setKeyId(String keyId)
The unique identifier for the customer master key (CMK) to which the grant applies.void
setName(String name)
The friendly name that identifies the grant.void
setOperations(Collection<String> operations)
The list of operations permitted by the grant.void
setRetiringPrincipal(String retiringPrincipal)
The principal that can retire the grant.String
toString()
Returns a string representation of this object; useful for testing and debugging.GrantListEntry
withConstraints(GrantConstraints constraints)
The conditions under which the grant's operations are allowed.GrantListEntry
withCreationDate(Date creationDate)
The date and time when the grant was created.GrantListEntry
withGranteePrincipal(String granteePrincipal)
The principal that receives the grant's permissions.GrantListEntry
withGrantId(String grantId)
The unique identifier for the grant.GrantListEntry
withIssuingAccount(String issuingAccount)
The AWS account under which the grant was issued.GrantListEntry
withKeyId(String keyId)
The unique identifier for the customer master key (CMK) to which the grant applies.GrantListEntry
withName(String name)
The friendly name that identifies the grant.GrantListEntry
withOperations(GrantOperation... operations)
The list of operations permitted by the grant.GrantListEntry
withOperations(String... operations)
The list of operations permitted by the grant.GrantListEntry
withOperations(Collection<String> operations)
The list of operations permitted by the grant.GrantListEntry
withRetiringPrincipal(String retiringPrincipal)
The principal that can retire the grant.
-
-
-
Method Detail
-
setKeyId
public void setKeyId(String keyId)
The unique identifier for the customer master key (CMK) to which the grant applies.
- Parameters:
keyId
- The unique identifier for the customer master key (CMK) to which the grant applies.
-
getKeyId
public String getKeyId()
The unique identifier for the customer master key (CMK) to which the grant applies.
- Returns:
- The unique identifier for the customer master key (CMK) to which the grant applies.
-
withKeyId
public GrantListEntry withKeyId(String keyId)
The unique identifier for the customer master key (CMK) to which the grant applies.
- Parameters:
keyId
- The unique identifier for the customer master key (CMK) to which the grant applies.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setGrantId
public void setGrantId(String grantId)
The unique identifier for the grant.
- Parameters:
grantId
- The unique identifier for the grant.
-
getGrantId
public String getGrantId()
The unique identifier for the grant.
- Returns:
- The unique identifier for the grant.
-
withGrantId
public GrantListEntry withGrantId(String grantId)
The unique identifier for the grant.
- Parameters:
grantId
- The unique identifier for the grant.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setName
public void setName(String name)
The friendly name that identifies the grant. If a name was provided in the CreateGrant request, that name is returned. Otherwise this value is null.
- Parameters:
name
- The friendly name that identifies the grant. If a name was provided in the CreateGrant request, that name is returned. Otherwise this value is null.
-
getName
public String getName()
The friendly name that identifies the grant. If a name was provided in the CreateGrant request, that name is returned. Otherwise this value is null.
- Returns:
- The friendly name that identifies the grant. If a name was provided in the CreateGrant request, that name is returned. Otherwise this value is null.
-
withName
public GrantListEntry withName(String name)
The friendly name that identifies the grant. If a name was provided in the CreateGrant request, that name is returned. Otherwise this value is null.
- Parameters:
name
- The friendly name that identifies the grant. If a name was provided in the CreateGrant request, that name is returned. Otherwise this value is null.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreationDate
public void setCreationDate(Date creationDate)
The date and time when the grant was created.
- Parameters:
creationDate
- The date and time when the grant was created.
-
getCreationDate
public Date getCreationDate()
The date and time when the grant was created.
- Returns:
- The date and time when the grant was created.
-
withCreationDate
public GrantListEntry withCreationDate(Date creationDate)
The date and time when the grant was created.
- Parameters:
creationDate
- The date and time when the grant was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setGranteePrincipal
public void setGranteePrincipal(String granteePrincipal)
The principal that receives the grant's permissions.
- Parameters:
granteePrincipal
- The principal that receives the grant's permissions.
-
getGranteePrincipal
public String getGranteePrincipal()
The principal that receives the grant's permissions.
- Returns:
- The principal that receives the grant's permissions.
-
withGranteePrincipal
public GrantListEntry withGranteePrincipal(String granteePrincipal)
The principal that receives the grant's permissions.
- Parameters:
granteePrincipal
- The principal that receives the grant's permissions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRetiringPrincipal
public void setRetiringPrincipal(String retiringPrincipal)
The principal that can retire the grant.
- Parameters:
retiringPrincipal
- The principal that can retire the grant.
-
getRetiringPrincipal
public String getRetiringPrincipal()
The principal that can retire the grant.
- Returns:
- The principal that can retire the grant.
-
withRetiringPrincipal
public GrantListEntry withRetiringPrincipal(String retiringPrincipal)
The principal that can retire the grant.
- Parameters:
retiringPrincipal
- The principal that can retire the grant.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIssuingAccount
public void setIssuingAccount(String issuingAccount)
The AWS account under which the grant was issued.
- Parameters:
issuingAccount
- The AWS account under which the grant was issued.
-
getIssuingAccount
public String getIssuingAccount()
The AWS account under which the grant was issued.
- Returns:
- The AWS account under which the grant was issued.
-
withIssuingAccount
public GrantListEntry withIssuingAccount(String issuingAccount)
The AWS account under which the grant was issued.
- Parameters:
issuingAccount
- The AWS account under which the grant was issued.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getOperations
public List<String> getOperations()
The list of operations permitted by the grant.
- Returns:
- The list of operations permitted by the grant.
- See Also:
GrantOperation
-
setOperations
public void setOperations(Collection<String> operations)
The list of operations permitted by the grant.
- Parameters:
operations
- The list of operations permitted by the grant.- See Also:
GrantOperation
-
withOperations
public GrantListEntry withOperations(String... operations)
The list of operations permitted by the grant.
NOTE: This method appends the values to the existing list (if any). Use
setOperations(java.util.Collection)
orwithOperations(java.util.Collection)
if you want to override the existing values.- Parameters:
operations
- The list of operations permitted by the grant.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
GrantOperation
-
withOperations
public GrantListEntry withOperations(Collection<String> operations)
The list of operations permitted by the grant.
- Parameters:
operations
- The list of operations permitted by the grant.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
GrantOperation
-
withOperations
public GrantListEntry withOperations(GrantOperation... operations)
The list of operations permitted by the grant.
- Parameters:
operations
- The list of operations permitted by the grant.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
GrantOperation
-
setConstraints
public void setConstraints(GrantConstraints constraints)
The conditions under which the grant's operations are allowed.
- Parameters:
constraints
- The conditions under which the grant's operations are allowed.
-
getConstraints
public GrantConstraints getConstraints()
The conditions under which the grant's operations are allowed.
- Returns:
- The conditions under which the grant's operations are allowed.
-
withConstraints
public GrantListEntry withConstraints(GrantConstraints constraints)
The conditions under which the grant's operations are allowed.
- Parameters:
constraints
- The conditions under which the grant's operations are allowed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public GrantListEntry clone()
-
-