// 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.firestore.admin.v1;

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

option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
option go_package = "cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb";
option java_multiple_files = true;
option java_outer_classname = "PitrSnapshotProto";
option java_package = "com.google.firestore.admin.v1";
option objc_class_prefix = "GCFS";
option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
option ruby_package = "Google::Cloud::Firestore::Admin::V1";

// A consistent snapshot of a database at a specific point in time.
// A PITR (Point-in-time recovery) snapshot with previous versions of a
// database's data is available for every minute up to the associated database's
// data retention period. If the PITR feature is enabled, the retention period
// is 7 days; otherwise, it is one hour.
message PitrSnapshot {
  // Required. The name of the database that this was a snapshot of. Format:
  // `projects/{project}/databases/{database}`.
  string database = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference) = {
      type: "firestore.googleapis.com/Database"
    }
  ];

  // Output only. Public UUID of the database the snapshot was associated with.
  bytes database_uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Required. Snapshot time of the database.
  google.protobuf.Timestamp snapshot_time = 3
      [(google.api.field_behavior) = REQUIRED];
}
