Class TypedAttributeValue
- java.lang.Object
-
- software.amazon.awssdk.services.clouddirectory.model.TypedAttributeValue
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<TypedAttributeValue.Builder,TypedAttributeValue>
@Generated("software.amazon.awssdk:codegen") public final class TypedAttributeValue extends Object implements SdkPojo, Serializable, ToCopyableBuilder<TypedAttributeValue.Builder,TypedAttributeValue>
Represents the data for a typed attribute. You can set one, and only one, of the elements. Each attribute in an item is a name-value pair. Attributes have a single value.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTypedAttributeValue.Builderstatic classTypedAttributeValue.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SdkBytesbinaryValue()A binary data value.BooleanbooleanValue()A Boolean data value.static TypedAttributeValue.Builderbuilder()InstantdatetimeValue()A date and time value.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static TypedAttributeValuefromBinaryValue(SdkBytes binaryValue)Create an instance of this class withbinaryValue()initialized to the given value.static TypedAttributeValuefromBooleanValue(Boolean booleanValue)Create an instance of this class withbooleanValue()initialized to the given value.static TypedAttributeValuefromDatetimeValue(Instant datetimeValue)Create an instance of this class withdatetimeValue()initialized to the given value.static TypedAttributeValuefromNumberValue(String numberValue)Create an instance of this class withnumberValue()initialized to the given value.static TypedAttributeValuefromStringValue(String stringValue)Create an instance of this class withstringValue()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()StringnumberValue()A number data value.List<SdkField<?>>sdkFields()static Class<? extends TypedAttributeValue.Builder>serializableBuilderClass()StringstringValue()A string data value.TypedAttributeValue.BuildertoBuilder()StringtoString()Returns a string representation of this object.TypedAttributeValue.Typetype()Retrieve an enum value representing which member of this object is populated.-
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
-
stringValue
public final String stringValue()
A string data value.
- Returns:
- A string data value.
-
binaryValue
public final SdkBytes binaryValue()
A binary data value.
- Returns:
- A binary data value.
-
booleanValue
public final Boolean booleanValue()
A Boolean data value.
- Returns:
- A Boolean data value.
-
numberValue
public final String numberValue()
A number data value.
- Returns:
- A number data value.
-
datetimeValue
public final Instant datetimeValue()
A date and time value.
- Returns:
- A date and time value.
-
toBuilder
public TypedAttributeValue.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<TypedAttributeValue.Builder,TypedAttributeValue>
-
builder
public static TypedAttributeValue.Builder builder()
-
serializableBuilderClass
public static Class<? extends TypedAttributeValue.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.
-
fromStringValue
public static TypedAttributeValue fromStringValue(String stringValue)
Create an instance of this class withstringValue()initialized to the given value.A string data value.
- Parameters:
stringValue- A string data value.
-
fromBinaryValue
public static TypedAttributeValue fromBinaryValue(SdkBytes binaryValue)
Create an instance of this class withbinaryValue()initialized to the given value.A binary data value.
- Parameters:
binaryValue- A binary data value.
-
fromBooleanValue
public static TypedAttributeValue fromBooleanValue(Boolean booleanValue)
Create an instance of this class withbooleanValue()initialized to the given value.A Boolean data value.
- Parameters:
booleanValue- A Boolean data value.
-
fromNumberValue
public static TypedAttributeValue fromNumberValue(String numberValue)
Create an instance of this class withnumberValue()initialized to the given value.A number data value.
- Parameters:
numberValue- A number data value.
-
fromDatetimeValue
public static TypedAttributeValue fromDatetimeValue(Instant datetimeValue)
Create an instance of this class withdatetimeValue()initialized to the given value.A date and time value.
- Parameters:
datetimeValue- A date and time value.
-
type
public TypedAttributeValue.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 beTypedAttributeValue.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 beTypedAttributeValue.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
-