Class TextPartValue
- java.lang.Object
-
- software.amazon.awssdk.services.notifications.model.TextPartValue
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<TextPartValue.Builder,TextPartValue>
@Generated("software.amazon.awssdk:codegen") public final class TextPartValue extends Object implements SdkPojo, Serializable, ToCopyableBuilder<TextPartValue.Builder,TextPartValue>
Describes text information objects containing fields that determine how text part objects are composed.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTextPartValue.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TextPartValue.Builderbuilder()StringdisplayText()A short single line description of the link.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasTextByLocale()For responses, this returns true if the service returned a value for the TextByLocale property.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends TextPartValue.Builder>serializableBuilderClass()Map<LocaleCode,String>textByLocale()A map of locales to the text in that locale.Map<String,String>textByLocaleAsStrings()A map of locales to the text in that locale.TextPartValue.BuildertoBuilder()StringtoString()Returns a string representation of this object.TextPartTypetype()The type of text part.StringtypeAsString()The type of text part.Stringurl()The URL itself.-
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
-
type
public final TextPartType type()
The type of text part. Determines the usage of all other fields and whether or not they're required.
If the service returns an enum value that is not available in the current SDK version,
typewill returnTextPartType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtypeAsString().- Returns:
- The type of text part. Determines the usage of all other fields and whether or not they're required.
- See Also:
TextPartType
-
typeAsString
public final String typeAsString()
The type of text part. Determines the usage of all other fields and whether or not they're required.
If the service returns an enum value that is not available in the current SDK version,
typewill returnTextPartType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtypeAsString().- Returns:
- The type of text part. Determines the usage of all other fields and whether or not they're required.
- See Also:
TextPartType
-
displayText
public final String displayText()
A short single line description of the link. Must be hyper-linked with the URL itself.
Used for text parts with the type
URL.- Returns:
- A short single line description of the link. Must be hyper-linked with the URL itself.
Used for text parts with the type
URL.
-
textByLocale
public final Map<LocaleCode,String> textByLocale()
A map of locales to the text in that locale.
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
hasTextByLocale()method.- Returns:
- A map of locales to the text in that locale.
-
hasTextByLocale
public final boolean hasTextByLocale()
For responses, this returns true if the service returned a value for the TextByLocale 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.
-
textByLocaleAsStrings
public final Map<String,String> textByLocaleAsStrings()
A map of locales to the text in that locale.
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
hasTextByLocale()method.- Returns:
- A map of locales to the text in that locale.
-
url
public final String url()
The URL itself.
- Returns:
- The URL itself.
-
toBuilder
public TextPartValue.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<TextPartValue.Builder,TextPartValue>
-
builder
public static TextPartValue.Builder builder()
-
serializableBuilderClass
public static Class<? extends TextPartValue.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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-