@Generated(value="software.amazon.awssdk:codegen") public final class DocumentAttributeValue extends Object implements SdkPojo, Serializable, ToCopyableBuilder<DocumentAttributeValue.Builder,DocumentAttributeValue>
The value of a document attribute. You can only provide one value for a document attribute.
| Modifier and Type | Class and Description |
|---|---|
static interface |
DocumentAttributeValue.Builder |
static class |
DocumentAttributeValue.Type |
| Modifier and Type | Method and Description |
|---|---|
static DocumentAttributeValue.Builder |
builder() |
Instant |
dateValue()
A date expressed as an ISO 8601 string.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
static DocumentAttributeValue |
fromDateValue(Instant dateValue)
Create an instance of this class with
dateValue() initialized to the given value. |
static DocumentAttributeValue |
fromLongValue(Long longValue)
Create an instance of this class with
longValue() initialized to the given value. |
static DocumentAttributeValue |
fromStringListValue(List<String> stringListValue)
Create an instance of this class with
stringListValue() initialized to the given value. |
static DocumentAttributeValue |
fromStringValue(String stringValue)
Create an instance of this class with
stringValue() initialized to the given value. |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasStringListValue()
For responses, this returns true if the service returned a value for the StringListValue property.
|
Long |
longValue()
A long integer value.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends DocumentAttributeValue.Builder> |
serializableBuilderClass() |
List<String> |
stringListValue()
A list of strings.
|
String |
stringValue()
A string, such as "department".
|
DocumentAttributeValue.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
DocumentAttributeValue.Type |
type()
Retrieve an enum value representing which member of this object is populated.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String stringValue()
A string, such as "department".
public final boolean hasStringListValue()
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<String> stringListValue()
A list of strings. The default maximum length or number of strings is 10.
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 hasStringListValue() method.
public final Long longValue()
A long integer value.
public final Instant dateValue()
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
public DocumentAttributeValue.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<DocumentAttributeValue.Builder,DocumentAttributeValue>public static DocumentAttributeValue.Builder builder()
public static Class<? extends DocumentAttributeValue.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public static DocumentAttributeValue fromStringValue(String stringValue)
stringValue() initialized to the given value.
A string, such as "department".
stringValue - A string, such as "department".public static DocumentAttributeValue fromStringListValue(List<String> stringListValue)
stringListValue() initialized to the given value.
A list of strings. The default maximum length or number of strings is 10.
stringListValue - A list of strings. The default maximum length or number of strings is 10.public static DocumentAttributeValue fromLongValue(Long longValue)
longValue() initialized to the given value.
A long integer value.
longValue - A long integer value.public static DocumentAttributeValue fromDateValue(Instant dateValue)
dateValue() initialized to the given value.
A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
dateValue - A date expressed as an ISO 8601 string.
It is important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
public DocumentAttributeValue.Type type()
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 Type.UNKNOWN_TO_SDK_VERSION if zero
members are set, and null if more than one member is set.Copyright © 2023. All rights reserved.