Class MemoryUpdateParams.Body
-
- All Implemented Interfaces:
public final class MemoryUpdateParams.BodyThe request body for Update a Memory. Set
content,path, or both.Changing
pathrenames the memory and never replaces another one. The request fails with HTTP status 409 if another memory uses the new path, or if the new path is an ancestor or descendant of another memory's path. Delete or rename the other memory first. The request also fails if the memory store is archived.If every field you set already matches the memory, nothing changes. The response is the current memory, which doesn't get a new version.
See the memory guide to learn more about updating memories.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMemoryUpdateParams.Body.BuilderA builder for Body.
-
Method Summary
Modifier and Type Method Description final Optional<String>content()New UTF-8 text content for the memory. final Optional<String>path()The new path of the memory, which renames it. final Optional<BetaManagedAgentsPrecondition>precondition()The condition that the memory must meet for the update to apply. final JsonField<String>_content()Returns the raw JSON value of content. final JsonField<String>_path()Returns the raw JSON value of path. final JsonField<BetaManagedAgentsPrecondition>_precondition()Returns the raw JSON value of precondition. final Map<String, JsonValue>_additionalProperties()final MemoryUpdateParams.Body.BuildertoBuilder()final MemoryUpdateParams.Bodyvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static MemoryUpdateParams.Body.Builderbuilder()Returns a mutable builder for constructing an instance of Body. -
-
Method Detail
-
content
final Optional<String> content()
New UTF-8 text content for the memory. Maximum 100 kB (102,400 bytes). Omit to leave the content unchanged (e.g., for a rename-only update).
-
path
final Optional<String> path()
The new path of the memory, which renames it. Omit it to keep the current path.
The memory keeps its
id. A path starts with/and has 1 to 20 segments. A segment can't be empty and can't be.or... A path can't contain control characters, format characters, or the line and paragraph separators U+2028 and U+2029. It must be in Unicode Normalization Form C and at most 1,024 bytes long. Paths are case-sensitive.
-
precondition
final Optional<BetaManagedAgentsPrecondition> precondition()
The condition that the memory must meet for the update to apply. Omit it to update unconditionally.
If the condition fails, the request fails with HTTP status 409.
-
_content
final JsonField<String> _content()
Returns the raw JSON value of content.
Unlike content, this method doesn't throw if the JSON field has an unexpected type.
-
_path
final JsonField<String> _path()
Returns the raw JSON value of path.
Unlike path, this method doesn't throw if the JSON field has an unexpected type.
-
_precondition
final JsonField<BetaManagedAgentsPrecondition> _precondition()
Returns the raw JSON value of precondition.
Unlike precondition, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final MemoryUpdateParams.Body.Builder toBuilder()
-
validate
final MemoryUpdateParams.Body validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static MemoryUpdateParams.Body.Builder builder()
Returns a mutable builder for constructing an instance of Body.
-
-
-
-