# Class MemoryEntry.Builder

java.lang.Object
com.google.adk.memory.MemoryEntry.Builder

Enclosing class:
  `MemoryEntry`

public abstract static class MemoryEntry.Builder extends Object
Builder for `MemoryEntry`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract MemoryEntry.Builder`
  `author(@Nullable String author)`
  Sets the author of the memory.
  `abstract MemoryEntry`
  `build()`
  Builds the immutable `MemoryEntry` object.
  `abstract MemoryEntry.Builder`
  `content(com.google.genai.types.Content content)`
  Sets the main content of the memory.
  `abstract MemoryEntry.Builder`
  `timestamp(@Nullable String timestamp)`
  Sets the timestamp when the original content of this memory happened.
  `MemoryEntry.Builder`
  `timestamp(Instant instant)`
  A convenience method to set the timestamp from an `Instant` object, formatted as an ISO 8601 string.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    public Builder()

- ## Method Details

  - ### content

    public abstract MemoryEntry.Builder content(com.google.genai.types.Content content)
    Sets the main content of the memory.

    This is a required field.

  - ### author

    public abstract MemoryEntry.Builder author(@Nullable String author)
    Sets the author of the memory.

  - ### timestamp

    public abstract MemoryEntry.Builder timestamp(@Nullable String timestamp)
    Sets the timestamp when the original content of this memory happened.

  - ### timestamp

    public MemoryEntry.Builder timestamp(Instant instant)
    A convenience method to set the timestamp from an `Instant` object, formatted as an ISO 8601 string.
    Parameters:
      `instant` - The timestamp as an Instant object.

  - ### build

    public abstract MemoryEntry build()
    Builds the immutable `MemoryEntry` object.