diff --git a/src/main/java/com/google/cloud/agentplatform/Memories.java b/src/main/java/com/google/cloud/agentplatform/Memories.java index 58680d8..a2b2cef 100644 --- a/src/main/java/com/google/cloud/agentplatform/Memories.java +++ b/src/main/java/com/google/cloud/agentplatform/Memories.java @@ -412,6 +412,13 @@ ObjectNode memoryConfigToVertex(JsonNode fromObject, ObjectNode parentObject) { Common.getValueByPath(fromObject, new String[] {"memoryId"})); } + if (Common.getValueByPath(fromObject, new String[] {"context"}) != null) { + Common.setValueByPath( + parentObject, + new String[] {"context"}, + Common.getValueByPath(fromObject, new String[] {"context"})); + } + return toObject; } @@ -635,6 +642,13 @@ ObjectNode updateMemoryConfigToVertex(JsonNode fromObject, ObjectNode parentObje Common.getValueByPath(fromObject, new String[] {"memoryId"})); } + if (Common.getValueByPath(fromObject, new String[] {"context"}) != null) { + Common.setValueByPath( + parentObject, + new String[] {"context"}, + Common.getValueByPath(fromObject, new String[] {"context"})); + } + if (Common.getValueByPath(fromObject, new String[] {"updateMask"}) != null) { Common.setValueByPath( parentObject, diff --git a/src/main/java/com/google/cloud/agentplatform/types/MemoryConfig.java b/src/main/java/com/google/cloud/agentplatform/types/MemoryConfig.java index 06c0b61..4b908f9 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/MemoryConfig.java +++ b/src/main/java/com/google/cloud/agentplatform/types/MemoryConfig.java @@ -104,6 +104,10 @@ public abstract class MemoryConfig extends JsonSerializable { @JsonProperty("memoryId") public abstract Optional memoryId(); + /** Optional. Represents the context of the memory. */ + @JsonProperty("context") + public abstract Optional context(); + /** Instantiates a builder for MemoryConfig. */ @ExcludeFromGeneratedCoverageReport public static Builder builder() { @@ -371,6 +375,24 @@ public Builder clearMemoryId() { return memoryId(Optional.empty()); } + /** + * Setter for context. + * + *

context: Optional. Represents the context of the memory. + */ + @JsonProperty("context") + public abstract Builder context(String context); + + @ExcludeFromGeneratedCoverageReport + abstract Builder context(Optional context); + + /** Clears the value of context field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearContext() { + return context(Optional.empty()); + } + public abstract MemoryConfig build(); } diff --git a/src/main/java/com/google/cloud/agentplatform/types/UpdateMemoryConfig.java b/src/main/java/com/google/cloud/agentplatform/types/UpdateMemoryConfig.java index 22d150b..41c9d90 100644 --- a/src/main/java/com/google/cloud/agentplatform/types/UpdateMemoryConfig.java +++ b/src/main/java/com/google/cloud/agentplatform/types/UpdateMemoryConfig.java @@ -104,6 +104,10 @@ public abstract class UpdateMemoryConfig extends JsonSerializable { @JsonProperty("memoryId") public abstract Optional memoryId(); + /** Optional. Represents the context of the memory. */ + @JsonProperty("context") + public abstract Optional context(); + /** * The update mask to apply. For the `FieldMask` definition, see * https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask. @@ -378,6 +382,24 @@ public Builder clearMemoryId() { return memoryId(Optional.empty()); } + /** + * Setter for context. + * + *

context: Optional. Represents the context of the memory. + */ + @JsonProperty("context") + public abstract Builder context(String context); + + @ExcludeFromGeneratedCoverageReport + abstract Builder context(Optional context); + + /** Clears the value of context field. */ + @ExcludeFromGeneratedCoverageReport + @CanIgnoreReturnValue + public Builder clearContext() { + return context(Optional.empty()); + } + /** * Setter for updateMask. *