@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class EntityItem extends Object implements Serializable, Cloneable, StructuredPojo
Contains information about an entity that can be referenced in a Cedar policy.
This data type is used as one of the fields in the EntitiesDefinition structure.
{ "identifier": { "entityType": "Photo", "entityId": "VacationPhoto94.jpg" }, "attributes": {}, "parents": [ { "entityType": "Album", "entityId": "alice_folder" } ] }
Constructor and Description |
---|
EntityItem() |
Modifier and Type | Method and Description |
---|---|
EntityItem |
addAttributesEntry(String key,
AttributeValue value)
Add a single Attributes entry
|
EntityItem |
clearAttributesEntries()
Removes all the entries added into Attributes.
|
EntityItem |
clone() |
boolean |
equals(Object obj) |
Map<String,AttributeValue> |
getAttributes()
A list of attributes for the entity.
|
EntityIdentifier |
getIdentifier()
The identifier of the entity.
|
List<EntityIdentifier> |
getParents()
The parents in the hierarchy that contains the entity.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setAttributes(Map<String,AttributeValue> attributes)
A list of attributes for the entity.
|
void |
setIdentifier(EntityIdentifier identifier)
The identifier of the entity.
|
void |
setParents(Collection<EntityIdentifier> parents)
The parents in the hierarchy that contains the entity.
|
String |
toString()
Returns a string representation of this object.
|
EntityItem |
withAttributes(Map<String,AttributeValue> attributes)
A list of attributes for the entity.
|
EntityItem |
withIdentifier(EntityIdentifier identifier)
The identifier of the entity.
|
EntityItem |
withParents(Collection<EntityIdentifier> parents)
The parents in the hierarchy that contains the entity.
|
EntityItem |
withParents(EntityIdentifier... parents)
The parents in the hierarchy that contains the entity.
|
public void setIdentifier(EntityIdentifier identifier)
The identifier of the entity.
identifier
- The identifier of the entity.public EntityIdentifier getIdentifier()
The identifier of the entity.
public EntityItem withIdentifier(EntityIdentifier identifier)
The identifier of the entity.
identifier
- The identifier of the entity.public Map<String,AttributeValue> getAttributes()
A list of attributes for the entity.
public void setAttributes(Map<String,AttributeValue> attributes)
A list of attributes for the entity.
attributes
- A list of attributes for the entity.public EntityItem withAttributes(Map<String,AttributeValue> attributes)
A list of attributes for the entity.
attributes
- A list of attributes for the entity.public EntityItem addAttributesEntry(String key, AttributeValue value)
public EntityItem clearAttributesEntries()
public List<EntityIdentifier> getParents()
The parents in the hierarchy that contains the entity.
public void setParents(Collection<EntityIdentifier> parents)
The parents in the hierarchy that contains the entity.
parents
- The parents in the hierarchy that contains the entity.public EntityItem withParents(EntityIdentifier... parents)
The parents in the hierarchy that contains the entity.
NOTE: This method appends the values to the existing list (if any). Use
setParents(java.util.Collection)
or withParents(java.util.Collection)
if you want to override
the existing values.
parents
- The parents in the hierarchy that contains the entity.public EntityItem withParents(Collection<EntityIdentifier> parents)
The parents in the hierarchy that contains the entity.
parents
- The parents in the hierarchy that contains the entity.public String toString()
toString
in class Object
Object.toString()
public EntityItem clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.