Class AttributeValue
- java.lang.Object
-
- software.amazon.awssdk.services.directoryservicedata.model.AttributeValue
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<AttributeValue.Builder,AttributeValue>
@Generated("software.amazon.awssdk:codegen") public final class AttributeValue extends Object implements SdkPojo, Serializable, ToCopyableBuilder<AttributeValue.Builder,AttributeValue>
The data type for an attribute. Each attribute value is described as a name-value pair. The name is the AD schema name, and the value is the data itself. For a list of supported attributes, see Directory Service Data Attributes.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAttributeValue.Builderstatic classAttributeValue.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Booleanbool()Indicates that the attribute type value is a boolean.static AttributeValue.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static AttributeValuefromBool(Boolean bool)Create an instance of this class withbool()initialized to the given value.static AttributeValuefromN(Long n)Create an instance of this class withn()initialized to the given value.static AttributeValuefromS(String s)Create an instance of this class withs()initialized to the given value.static AttributeValuefromSs(List<String> ss)Create an instance of this class withss()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasSs()For responses, this returns true if the service returned a value for the SS property.Longn()Indicates that the attribute type value is a number.Strings()Indicates that the attribute type value is a string.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends AttributeValue.Builder>serializableBuilderClass()List<String>ss()Indicates that the attribute type value is a string set.AttributeValue.BuildertoBuilder()StringtoString()Returns a string representation of this object.AttributeValue.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
-
bool
public final Boolean bool()
Indicates that the attribute type value is a boolean. For example:
"BOOL": true- Returns:
- Indicates that the attribute type value is a boolean. For example:
"BOOL": true
-
n
public final Long n()
Indicates that the attribute type value is a number. For example:
"N": "16"- Returns:
- Indicates that the attribute type value is a number. For example:
"N": "16"
-
s
public final String s()
Indicates that the attribute type value is a string. For example:
"S": "S Group"- Returns:
- Indicates that the attribute type value is a string. For example:
"S": "S Group"
-
hasSs
public final boolean hasSs()
For responses, this returns true if the service returned a value for the SS property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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.
-
ss
public final List<String> ss()
Indicates that the attribute type value is a string set. For example:
"SS": ["sample_service_class/host.sample.com:1234/sample_service_name_1", "sample_service_class/host.sample.com:1234/sample_service_name_2"]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
hasSs()method.- Returns:
- Indicates that the attribute type value is a string set. For example:
"SS": ["sample_service_class/host.sample.com:1234/sample_service_name_1", "sample_service_class/host.sample.com:1234/sample_service_name_2"]
-
toBuilder
public AttributeValue.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<AttributeValue.Builder,AttributeValue>
-
builder
public static AttributeValue.Builder builder()
-
serializableBuilderClass
public static Class<? extends AttributeValue.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.
-
fromBool
public static AttributeValue fromBool(Boolean bool)
Create an instance of this class withbool()initialized to the given value.Indicates that the attribute type value is a boolean. For example:
"BOOL": true- Parameters:
bool- Indicates that the attribute type value is a boolean. For example:"BOOL": true
-
fromN
public static AttributeValue fromN(Long n)
Create an instance of this class withn()initialized to the given value.Indicates that the attribute type value is a number. For example:
"N": "16"- Parameters:
n- Indicates that the attribute type value is a number. For example:"N": "16"
-
fromS
public static AttributeValue fromS(String s)
Create an instance of this class withs()initialized to the given value.Indicates that the attribute type value is a string. For example:
"S": "S Group"- Parameters:
s- Indicates that the attribute type value is a string. For example:"S": "S Group"
-
fromSs
public static AttributeValue fromSs(List<String> ss)
Create an instance of this class withss()initialized to the given value.Indicates that the attribute type value is a string set. For example:
"SS": ["sample_service_class/host.sample.com:1234/sample_service_name_1", "sample_service_class/host.sample.com:1234/sample_service_name_2"]- Parameters:
ss- Indicates that the attribute type value is a string set. For example:"SS": ["sample_service_class/host.sample.com:1234/sample_service_name_1", "sample_service_class/host.sample.com:1234/sample_service_name_2"]
-
type
public AttributeValue.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 beAttributeValue.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 beAttributeValue.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-