Skip to content

Commit

Permalink
feat: A new message Backup is added
Browse files Browse the repository at this point in the history
feat: A new resource_definition `firestore.googleapis.com/Backup` is added
feat: A new method `GetBackup` is added to service `FirestoreAdmin`
feat: A new method `ListBackups` is added to service `FirestoreAdmin`
feat: A new method `DeleteBackup` is added to service `FirestoreAdmin`
feat: A new method `RestoreDatabase` is added to service `FirestoreAdmin`
feat: A new method `CreateBackupSchedule` is added to service `FirestoreAdmin`
feat: A new method `GetBackupSchedule` is added to service `FirestoreAdmin`
feat: A new method `ListBackupSchedules` is added to service `FirestoreAdmin`
feat: A new method `UpdateBackupSchedule` is added to service `FirestoreAdmin`
feat: A new method `DeleteBackupSchedule` is added to service `FirestoreAdmin`
feat: A new message `CreateBackupScheduleRequest` is added
feat: A new message `GetBackupScheduleRequest` is added
feat: A new message `UpdateBackupScheduleRequest` is added
feat: A new message `ListBackupSchedulesRequest` is added
feat: A new message `ListBackupSchedulesResponse` is added
feat: A new message `DeleteBackupScheduleRequest` is added
feat: A new message `GetBackupRequest` is added
feat: A new message `ListBackupsRequest` is added
feat: A new message `ListBackupsResponse` is added
feat: A new message `DeleteBackupRequest` is added
feat: A new message `RestoreDatabaseRequest` is added
feat: A new message `RestoreDatabaseMetadata` is added
feat: A new message `BackupSchedule` is added
feat: A new resource_definition `firestore.googleapis.com/BackupSchedule` is added
feat: A new message `DailyRecurrence` is added
feat: A new message `WeeklyRecurrence` is added

PiperOrigin-RevId: 616127901
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 15, 2024
1 parent 30f7a0c commit b5debc8
Show file tree
Hide file tree
Showing 6 changed files with 535 additions and 13 deletions.
23 changes: 21 additions & 2 deletions google/firestore/admin/v1/BUILD.bazel
Expand Up @@ -9,31 +9,37 @@
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.

# buildifier: disable=load-on-top

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
# buildifier: disable=same-origin-load
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "admin_proto",
srcs = [
"backup.proto",
"database.proto",
"field.proto",
"firestore_admin.proto",
"index.proto",
"location.proto",
"operation.proto",
"schedule.proto",
],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"//google/type:dayofweek_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
Expand All @@ -53,6 +59,7 @@ proto_library_with_info(
##############################################################################
# Java
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
Expand Down Expand Up @@ -117,6 +124,7 @@ java_gapic_assembly_gradle_pkg(
##############################################################################
# Go
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
Expand All @@ -132,6 +140,7 @@ go_proto_library(
deps = [
"//google/api:annotations_go_proto",
"//google/longrunning:longrunning_go_proto",
"//google/type:dayofweek_go_proto",
],
)

Expand All @@ -151,6 +160,7 @@ go_gapic_library(
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go_longrunning//:go_default_library",
"@com_google_cloud_go_longrunning//autogen:go_default_library",
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
],
)

Expand All @@ -169,6 +179,7 @@ go_gapic_assembly_pkg(
##############################################################################
# Python
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"py_gapic_assembly_pkg",
Expand Down Expand Up @@ -212,6 +223,7 @@ py_gapic_assembly_pkg(
##############################################################################
# PHP
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
Expand All @@ -232,7 +244,9 @@ php_gapic_library(
rest_numeric_enums = True,
service_yaml = "firestore_v1.yaml",
transport = "grpc+rest",
deps = [":admin_php_proto"],
deps = [
":admin_php_proto",
],
)

# Open Source Packages
Expand All @@ -247,6 +261,7 @@ php_gapic_assembly_pkg(
##############################################################################
# Node.js
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
Expand Down Expand Up @@ -277,6 +292,7 @@ nodejs_gapic_assembly_pkg(
##############################################################################
# Ruby
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
Expand Down Expand Up @@ -331,6 +347,7 @@ ruby_gapic_assembly_pkg(
##############################################################################
# C#
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
Expand All @@ -341,6 +358,7 @@ load(

csharp_proto_library(
name = "admin_csharp_proto",
extra_opts = [],
deps = [":admin_proto"],
)

Expand Down Expand Up @@ -377,6 +395,7 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# buildifier: disable=same-origin-load
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
Expand Down
107 changes: 107 additions & 0 deletions google/firestore/admin/v1/backup.proto
@@ -0,0 +1,107 @@
// Copyright 2023 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 = "BackupProto";
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 Backup of a Cloud Firestore Database.
//
// The backup contains all documents and index configurations for the given
// database at a specific point in time.
message Backup {
option (google.api.resource) = {
type: "firestore.googleapis.com/Backup"
pattern: "projects/{project}/locations/{location}/backups/{backup}"
};

// Backup specific statistics.
message Stats {
// Output only. Summation of the size of all documents and index entries in
// the backup, measured in bytes.
int64 size_bytes = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The total number of documents contained in the backup.
int64 document_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The total number of index entries contained in the backup.
int64 index_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Indicate the current state of the backup.
enum State {
// The state is unspecified.
STATE_UNSPECIFIED = 0;

// The pending backup is still being created. Operations on the
// backup will be rejected in this state.
CREATING = 1;

// The backup is complete and ready to use.
READY = 2;

// The backup is not available at this moment.
NOT_AVAILABLE = 3;
}

// Output only. The unique resource name of the Backup.
//
// Format is `projects/{project}/locations/{location}/backups/{backup}`.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Name of the Firestore database that the backup is from.
//
// Format is `projects/{project}/databases/{database}`.
string database = 2 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "firestore.googleapis.com/Database"
}
];

// Output only. The system-generated UUID4 for the Firestore database that the
// backup is from.
string database_uid = 7 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The backup contains an externally consistent copy of the
// database at this time.
google.protobuf.Timestamp snapshot_time = 3
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The timestamp at which this backup expires.
google.protobuf.Timestamp expire_time = 4
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Statistics about the backup.
//
// This data only becomes available after the backup is fully materialized to
// secondary storage. This field will be empty till then.
Stats stats = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The current state of the backup.
State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
}

0 comments on commit b5debc8

Please sign in to comment.