Class MemoryCreateParams.Body
-
- All Implemented Interfaces:
public final class MemoryCreateParams.BodyThe request body for Create a Memory.
Creating a memory never replaces another one. The request fails with HTTP status 409 if a memory already uses
path, or ifpathis an ancestor or descendant of another memory's path. It also fails, with HTTP status 400, if the memory store is archived or has reached its limit of 10,000 memories. To change an existing memory, update it instead.See the memory guide to learn more about creating memories.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMemoryCreateParams.Body.BuilderA builder for Body.
-
Method Summary
Modifier and Type Method Description final Optional<String>content()The UTF-8 text content of the new memory. final Stringpath()The path of the new memory, such as /projects/foo/notes.md.final JsonField<String>_content()Returns the raw JSON value of content. final JsonField<String>_path()Returns the raw JSON value of path. final Map<String, JsonValue>_additionalProperties()final MemoryCreateParams.Body.BuildertoBuilder()final MemoryCreateParams.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 MemoryCreateParams.Body.Builderbuilder()Returns a mutable builder for constructing an instance of Body. -
-
Method Detail
-
content
final Optional<String> content()
The UTF-8 text content of the new memory. Pass
""to create an empty memory.The maximum size is 100 kB (102,400 bytes).
-
path
final String path()
The path of the new memory, such as
/projects/foo/notes.md. Paths are case-sensitive.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.
-
_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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final MemoryCreateParams.Body.Builder toBuilder()
-
validate
final MemoryCreateParams.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 MemoryCreateParams.Body.Builder builder()
Returns a mutable builder for constructing an instance of Body.
The following fields are required:
.content() .path()
-
-
-
-