@Generated(value="software.amazon.awssdk:codegen") public final class AttributeValue extends Object implements SdkPojo, Serializable, ToCopyableBuilder<AttributeValue.Builder,AttributeValue>
The value of an attribute.
Contains information about the runtime context for a request for which an authorization decision is made.
This data type is used as a member of the ContextDefinition structure which is uses as a request parameter for the IsAuthorized and IsAuthorizedWithToken operations.
| Modifier and Type | Class and Description |
|---|---|
static interface |
AttributeValue.Builder |
static class |
AttributeValue.Type |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
booleanValue()
An attribute value of Boolean
type.
|
static AttributeValue.Builder |
builder() |
EntityIdentifier |
entityIdentifier()
An attribute value of type EntityIdentifier.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
static AttributeValue |
fromBooleanValue(Boolean booleanValue)
Create an instance of this class with
booleanValue() initialized to the given value. |
static AttributeValue |
fromEntityIdentifier(Consumer<EntityIdentifier.Builder> entityIdentifier)
Create an instance of this class with
entityIdentifier() initialized to the given value. |
static AttributeValue |
fromEntityIdentifier(EntityIdentifier entityIdentifier)
Create an instance of this class with
entityIdentifier() initialized to the given value. |
static AttributeValue |
fromLongValue(Long longValue)
Create an instance of this class with
longValue() initialized to the given value. |
static AttributeValue |
fromRecord(Map<String,AttributeValue> record)
Create an instance of this class with
record() initialized to the given value. |
static AttributeValue |
fromSet(List<AttributeValue> set)
Create an instance of this class with
set() initialized to the given value. |
static AttributeValue |
fromString(String string)
Create an instance of this class with
string() initialized to the given value. |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasRecord()
For responses, this returns true if the service returned a value for the Record property.
|
boolean |
hasSet()
For responses, this returns true if the service returned a value for the Set property.
|
Long |
longValue()
An attribute value of Long type.
|
Map<String,AttributeValue> |
record()
An attribute value of Record
type.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends AttributeValue.Builder> |
serializableBuilderClass() |
List<AttributeValue> |
set()
An attribute value of Set type.
|
String |
string()
An attribute value of String
type.
|
AttributeValue.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
AttributeValue.Type |
type()
Retrieve an enum value representing which member of this object is populated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final Boolean booleanValue()
An attribute value of Boolean type.
Example: {"boolean": true}
Example: {"boolean": true}
public final EntityIdentifier entityIdentifier()
An attribute value of type EntityIdentifier.
Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
Example:
"entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
public final Long longValue()
An attribute value of Long type.
Example: {"long": 0}
Example: {"long": 0}
public final String string()
An attribute value of String type.
Example: {"string": "abc"}
Example: {"string": "abc"}
public final boolean hasSet()
isEmpty() method on the property). This is useful
because the SDK will never return a null collection or map, but you may need to differentiate between the service
returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
if a value for the property was specified in the request builder, and false if a value was not specified.public final List<AttributeValue> set()
An attribute value of Set type.
Example: {"set": [ {} ] }
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasSet() method.
Example: {"set": [ {} ] }
public final boolean hasRecord()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final Map<String,AttributeValue> record()
An attribute value of Record type.
Example: {"record": { "keyName": {} } }
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasRecord() method.
Example: {"record": { "keyName": {} } }
public AttributeValue.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<AttributeValue.Builder,AttributeValue>public static AttributeValue.Builder builder()
public static Class<? extends AttributeValue.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public static AttributeValue fromBooleanValue(Boolean booleanValue)
booleanValue() initialized to the given value.
An attribute value of Boolean type.
Example: {"boolean": true}
booleanValue - An attribute value of Boolean type.
Example: {"boolean": true}
public static AttributeValue fromEntityIdentifier(EntityIdentifier entityIdentifier)
entityIdentifier() initialized to the given value.
An attribute value of type EntityIdentifier.
Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
entityIdentifier - An attribute value of type EntityIdentifier.
Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
public static AttributeValue fromEntityIdentifier(Consumer<EntityIdentifier.Builder> entityIdentifier)
entityIdentifier() initialized to the given value.
An attribute value of type EntityIdentifier.
Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
entityIdentifier - An attribute value of type EntityIdentifier.
Example: "entityIdentifier": { "entityId": "<id>", "entityType": "<entity type>"}
public static AttributeValue fromLongValue(Long longValue)
longValue() initialized to the given value.
An attribute value of Long type.
Example: {"long": 0}
longValue - An attribute value of Long
type.
Example: {"long": 0}
public static AttributeValue fromString(String string)
string() initialized to the given value.
An attribute value of String type.
Example: {"string": "abc"}
string - An attribute value of String type.
Example: {"string": "abc"}
public static AttributeValue fromSet(List<AttributeValue> set)
set() initialized to the given value.
An attribute value of Set type.
Example: {"set": [ {} ] }
set - An attribute value of Set
type.
Example: {"set": [ {} ] }
public static AttributeValue fromRecord(Map<String,AttributeValue> record)
record() initialized to the given value.
An attribute value of Record type.
Example: {"record": { "keyName": {} } }
record - An attribute value of Record type.
Example: {"record": { "keyName": {} } }
public AttributeValue.Type type()
AttributeValue.Type.UNKNOWN_TO_SDK_VERSION if 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 be AttributeValue.Type.UNKNOWN_TO_SDK_VERSION if zero
members are set, and null if more than one member is set.Copyright © 2023. All rights reserved.