// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.aiplatform.v1beta1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
option java_multiple_files = true;
option java_outer_classname = "MemoryBankProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
option ruby_package = "Google::Cloud::AIPlatform::V1beta1";

// A memory.
message Memory {
  option (google.api.resource) = {
    type: "aiplatform.googleapis.com/Memory"
    pattern: "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/memories/{memory}"
    plural: "memories"
    singular: "memory"
  };

  // The expiration of the Memory. If not set, the Memory will not be
  // automatically deleted.
  oneof expiration {
    // Optional. Timestamp of when this resource is considered expired.
    // This is *always* provided on output, regardless of what `expiration` was
    // sent on input.
    google.protobuf.Timestamp expire_time = 13
        [(google.api.field_behavior) = OPTIONAL];

    // Optional. Input only. The TTL for this resource. The expiration time is
    // computed: now + TTL.
    google.protobuf.Duration ttl = 14 [(google.api.field_behavior) = OPTIONAL];
  }

  // Identifier. The resource name of the Memory.
  // Format:
  // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/memories/{memory}`
  string name = 1 [(google.api.field_behavior) = IDENTIFIER];

  // Optional. Display name of the Memory.
  string display_name = 2 [(google.api.field_behavior) = OPTIONAL];

  // Optional. Description of the Memory.
  string description = 3 [(google.api.field_behavior) = OPTIONAL];

  // Output only. Timestamp when this Memory was created.
  google.protobuf.Timestamp create_time = 4
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Timestamp when this Memory was most recently updated.
  google.protobuf.Timestamp update_time = 5
      [(google.api.field_behavior) = OUTPUT_ONLY];

  // Required. Semantic knowledge extracted from the source content.
  string fact = 10 [(google.api.field_behavior) = REQUIRED];

  // Required. Immutable. The scope of the Memory. Memories are isolated
  // within their scope. The scope is defined when creating or generating
  // memories. Scope values cannot contain the wildcard character '*'.
  map<string, string> scope = 11 [(google.api.field_behavior) = REQUIRED];
}
