Class MemoryRecordMetadataValue

java.lang.Object
software.amazon.awssdk.services.bedrockagentcore.model.MemoryRecordMetadataValue
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<MemoryRecordMetadataValue.Builder,MemoryRecordMetadataValue>

@Generated("software.amazon.awssdk:codegen") public final class MemoryRecordMetadataValue extends Object implements SdkPojo, Serializable, ToCopyableBuilder<MemoryRecordMetadataValue.Builder,MemoryRecordMetadataValue>

The value of a memory record metadata entry.

See Also:
  • Method Details

    • stringValue

      public final String stringValue()

      A string value.

      Returns:
      A string value.
    • hasStringListValue

      public final boolean hasStringListValue()
      For responses, this returns true if the service returned a value for the StringListValue property. This DOES NOT check that the value is non-empty (for which, you should check the 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.
    • stringListValue

      public final List<String> stringListValue()

      A list of string values.

      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.

      Returns:
      A list of string values.
    • numberValue

      public final Double numberValue()

      A numeric value.

      Returns:
      A numeric value.
    • dateTimeValue

      public final Instant dateTimeValue()

      A timestamp value in ISO 8601 UTC format.

      Returns:
      A timestamp value in ISO 8601 UTC format.
    • toBuilder

      Specified by:
      toBuilder in interface ToCopyableBuilder<MemoryRecordMetadataValue.Builder,MemoryRecordMetadataValue>
    • builder

      public static MemoryRecordMetadataValue.Builder builder()
    • serializableBuilderClass

      public static Class<? extends MemoryRecordMetadataValue.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Specified by:
      equalsBySdkFields in interface SdkPojo
    • 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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • fromStringValue

      public static MemoryRecordMetadataValue fromStringValue(String stringValue)
      Create an instance of this class with stringValue() initialized to the given value.

      A string value.

      Parameters:
      stringValue - A string value.
    • fromStringListValue

      public static MemoryRecordMetadataValue fromStringListValue(List<String> stringListValue)
      Create an instance of this class with stringListValue() initialized to the given value.

      A list of string values.

      Parameters:
      stringListValue - A list of string values.
    • fromNumberValue

      public static MemoryRecordMetadataValue fromNumberValue(Double numberValue)
      Create an instance of this class with numberValue() initialized to the given value.

      A numeric value.

      Parameters:
      numberValue - A numeric value.
    • fromDateTimeValue

      public static MemoryRecordMetadataValue fromDateTimeValue(Instant dateTimeValue)
      Create an instance of this class with dateTimeValue() initialized to the given value.

      A timestamp value in ISO 8601 UTC format.

      Parameters:
      dateTimeValue - A timestamp value in ISO 8601 UTC format.
    • type

      Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will be MemoryRecordMetadataValue.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 MemoryRecordMetadataValue.Type.UNKNOWN_TO_SDK_VERSION if zero members are set, and null if more than one member is set.
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo