xref: /aosp_15_r20/external/googleapis/google/cloud/gkebackup/logging/v1/logged_backup.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.gkebackup.logging.v1;
18
19option go_package = "cloud.google.com/go/gkebackup/logging/apiv1/loggingpb;loggingpb";
20option java_multiple_files = true;
21option java_outer_classname = "LoggedBackupProto";
22option java_package = "google.cloud.gkebackup.logging.v1";
23option csharp_namespace = "Google.Cloud.GkeBackup.Logging.V1";
24option php_namespace = "Google\\Cloud\\GkeBackup\\Logging\\V1";
25option ruby_package = "Google::Cloud::GkeBackup::Logging::V1";
26
27// Backup as stored in Platform log. It's used to log the details of
28// a createBackup/updateBackup request, so only fields that can be taken
29// from API calls are included here.
30message LoggedBackup {
31  // State
32  enum State {
33    // The Backup resource is in the process of being created.
34    STATE_UNSPECIFIED = 0;
35
36    // The Backup resource has been created and the associated BackupJob
37    // Kubernetes resource has been injected into the source cluster.
38    CREATING = 1;
39
40    // The gkebackup agent in the cluster has begun executing the backup
41    // operation.
42    IN_PROGRESS = 2;
43
44    // The backup operation has completed successfully.
45    SUCCEEDED = 3;
46
47    // The backup operation has failed.
48    FAILED = 4;
49
50    // This Backup resource (and its associated artifacts) is in the process
51    // of being deleted.
52    DELETING = 5;
53  }
54
55  // A set of custom labels supplied by user.
56  map<string, string> labels = 1;
57
58  // delete_lock_days specifies the number of days from the create_time of this
59  // Backup before which deletion will be blocked.
60  int32 delete_lock_days = 2;
61
62  // retain_days specifies the desired number of days from the create_time of
63  // this Backup after which it will be automatically deleted.
64  int32 retain_days = 3;
65
66  // User specified descriptive string for this Backup.
67  string description = 4;
68
69  // Current state of the Backup
70  State state = 5;
71
72  // Human-readable description of why the backup is in the current `state`.
73  string state_reason = 6;
74}
75