Class EntityReference
- java.lang.Object
-
- software.amazon.awssdk.services.verifiedpermissions.model.EntityReference
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<EntityReference.Builder,EntityReference>
@Generated("software.amazon.awssdk:codegen") public final class EntityReference extends Object implements SdkPojo, Serializable, ToCopyableBuilder<EntityReference.Builder,EntityReference>
Contains information about a principal or resource that can be referenced in a Cedar policy.
This data type is used as part of the PolicyFilter structure that is used as a request parameter for the ListPolicies operation..
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEntityReference.Builderstatic classEntityReference.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EntityReference.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static EntityReferencefromIdentifier(Consumer<EntityIdentifier.Builder> identifier)Create an instance of this class withidentifier()initialized to the given value.static EntityReferencefromIdentifier(EntityIdentifier identifier)Create an instance of this class withidentifier()initialized to the given value.static EntityReferencefromUnspecified(Boolean unspecified)Create an instance of this class withunspecified()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()EntityIdentifieridentifier()The identifier of the entity.List<SdkField<?>>sdkFields()static Class<? extends EntityReference.Builder>serializableBuilderClass()EntityReference.BuildertoBuilder()StringtoString()Returns a string representation of this object.EntityReference.Typetype()Retrieve an enum value representing which member of this object is populated.Booleanunspecified()Used to indicate that a principal or resource is not specified.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
unspecified
public final Boolean unspecified()
Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.
- Returns:
- Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.
-
identifier
public final EntityIdentifier identifier()
The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
- Returns:
- The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
-
toBuilder
public EntityReference.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<EntityReference.Builder,EntityReference>
-
builder
public static EntityReference.Builder builder()
-
serializableBuilderClass
public static Class<? extends EntityReference.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
fromUnspecified
public static EntityReference fromUnspecified(Boolean unspecified)
Create an instance of this class withunspecified()initialized to the given value.Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.
- Parameters:
unspecified- Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.
-
fromIdentifier
public static EntityReference fromIdentifier(EntityIdentifier identifier)
Create an instance of this class withidentifier()initialized to the given value.The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
- Parameters:
identifier- The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
-
fromIdentifier
public static EntityReference fromIdentifier(Consumer<EntityIdentifier.Builder> identifier)
Create an instance of this class withidentifier()initialized to the given value.The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
- Parameters:
identifier- The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
-
type
public EntityReference.Type type()
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beEntityReference.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beEntityReference.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
-