Interface Memory.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Memory.Builder,Memory>, SdkBuilder<Memory.Builder,Memory>, SdkPojo
Enclosing class:
Memory

@Mutable @NotThreadSafe public static interface Memory.Builder extends SdkPojo, CopyableBuilder<Memory.Builder,Memory>
  • Method Details

    • memoryId

      Memory.Builder memoryId(String memoryId)

      The memory's ID, assigned by the service.

      Parameters:
      memoryId - The memory's ID, assigned by the service.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • memoryType

      Memory.Builder memoryType(String memoryType)

      The memory type.

      Parameters:
      memoryType - The memory type.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • memoryType

      Memory.Builder memoryType(MemoryType memoryType)

      The memory type.

      Parameters:
      memoryType - The memory type.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • strategyName

      Memory.Builder strategyName(String strategyName)

      The name of the strategy the memory belongs to, for example user-facts. A space can hold several strategies of the same type, so this tells them apart. Absent when the memory's strategy is no longer declared on the space, for example right after the strategy is deleted.

      Parameters:
      strategyName - The name of the strategy the memory belongs to, for example user-facts. A space can hold several strategies of the same type, so this tells them apart. Absent when the memory's strategy is no longer declared on the space, for example right after the strategy is deleted.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • content

      Memory.Builder content(String content)

      The memory text.

      Parameters:
      content - The memory text.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • systemMetadata

      Memory.Builder systemMetadata(SystemMetadata systemMetadata)

      Provenance for the memory: the owning actor and session, and when it was created and last updated. Always present. updatedAt equals createdAt for a memory that has never been updated.

      Parameters:
      systemMetadata - Provenance for the memory: the owning actor and session, and when it was created and last updated. Always present. updatedAt equals createdAt for a memory that has never been updated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • systemMetadata

      default Memory.Builder systemMetadata(Consumer<SystemMetadata.Builder> systemMetadata)

      Provenance for the memory: the owning actor and session, and when it was created and last updated. Always present. updatedAt equals createdAt for a memory that has never been updated.

      This is a convenience method that creates an instance of the SystemMetadata.Builder avoiding the need to create one manually via SystemMetadata.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to systemMetadata(SystemMetadata).

      Parameters:
      systemMetadata - a consumer that will call methods on SystemMetadata.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • metadata

      Memory.Builder metadata(Map<String,String> metadata)

      The memory's metadata tags. All values are strings. May be empty.

      Parameters:
      metadata - The memory's metadata tags. All values are strings. May be empty.
      Returns:
      Returns a reference to this object so that method calls can be chained together.