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

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

Contains information about a memory record in an AgentCore Memory resource.

See Also:
  • Method Details

    • memoryRecordId

      public final String memoryRecordId()

      The unique identifier of the memory record.

      Returns:
      The unique identifier of the memory record.
    • content

      public final MemoryContent content()

      The content of the memory record.

      Returns:
      The content of the memory record.
    • memoryStrategyId

      public final String memoryStrategyId()

      The identifier of the memory strategy associated with this record.

      Returns:
      The identifier of the memory strategy associated with this record.
    • hasNamespaces

      public final boolean hasNamespaces()
      For responses, this returns true if the service returned a value for the Namespaces 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.
    • namespaces

      public final List<String> namespaces()

      The namespaces associated with this memory record. Namespaces help organize and categorize memory records.

      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 hasNamespaces() method.

      Returns:
      The namespaces associated with this memory record. Namespaces help organize and categorize memory records.
    • createdAt

      public final Instant createdAt()

      The timestamp when the memory record was created.

      Returns:
      The timestamp when the memory record was created.
    • hasMetadata

      public final boolean hasMetadata()
      For responses, this returns true if the service returned a value for the Metadata 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.
    • metadata

      public final Map<String,MemoryRecordMetadataValue> metadata()

      A map of metadata key-value pairs associated with a memory record.

      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 hasMetadata() method.

      Returns:
      A map of metadata key-value pairs associated with a memory record.
    • toBuilder

      public MemoryRecord.Builder toBuilder()
      Specified by:
      toBuilder in interface ToCopyableBuilder<MemoryRecord.Builder,MemoryRecord>
    • builder

      public static MemoryRecord.Builder builder()
    • serializableBuilderClass

      public static Class<? extends MemoryRecord.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)
    • 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