xref: /aosp_15_r20/external/googleapis/google/cloud/gkebackup/logging/v1/logging.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
19import "google/cloud/gkebackup/logging/v1/logged_backup.proto";
20import "google/cloud/gkebackup/logging/v1/logged_backup_plan.proto";
21import "google/cloud/gkebackup/logging/v1/logged_restore.proto";
22import "google/cloud/gkebackup/logging/v1/logged_restore_plan.proto";
23import "google/protobuf/field_mask.proto";
24import "google/rpc/status.proto";
25
26option go_package = "cloud.google.com/go/gkebackup/logging/apiv1/loggingpb;loggingpb";
27option java_multiple_files = true;
28option java_outer_classname = "LoggingProto";
29option java_package = "google.cloud.gkebackup.logging.v1";
30option csharp_namespace = "Google.Cloud.GkeBackup.Logging.V1";
31option php_namespace = "Google\\Cloud\\GkeBackup\\Logging\\V1";
32option ruby_package = "Google::Cloud::GkeBackup::Logging::V1";
33
34// use case 1
35// A log entry when modification(creation, update, deletion) is made to a
36// BackupPlan
37message BackupPlanChange {
38  // The full name of the old BackupPlan resource that is being modified.
39  // Empty for creation.
40  // Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}
41  string backup_plan = 1;
42
43  // Type of the change is being made.
44  ChangeType change_type = 2;
45
46  // Modification details.
47  google.protobuf.FieldMask update_mask = 3;
48
49  // The input BackupPlan resource with the updated fields populated to update
50  // the source BackupPlan to.
51  LoggedBackupPlan input_backup_plan = 4;
52
53  // The error code and message.
54  google.rpc.Status error = 5;
55}
56
57// use case 2
58// A log entry when modification(creation, update, deletion) is made to a
59// Backup
60message BackupChange {
61  // The full name of the Backup resource that is being modified.
62  // Format:
63  // projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
64  string backup = 1;
65
66  // Type of the change is being made.
67  ChangeType change_type = 2;
68
69  // Whether the change is made manually or automatically.
70  bool scheduled = 3;
71
72  // Modification details.
73  google.protobuf.FieldMask update_mask = 4;
74
75  // The input Backup resource with the updated fields populated to update
76  // the source Backup to, or the backup created automatically from retention
77  // policy.
78  LoggedBackup input_backup = 5;
79
80  // The error code and message.
81  google.rpc.Status error = 6;
82}
83
84// use case 3
85// A log entry when modification(creation, update, deletion) is made to a
86// restorePlan.
87message RestorePlanChange {
88  // The full name of the RestorePlan resource that is being modified.
89  // Empty for creation.
90  // Format: projects/*/locations/*/restorePlans/*
91  string restore_plan = 1;
92
93  // Type of the change is being made.
94  ChangeType change_type = 2;
95
96  // Modification details.
97  google.protobuf.FieldMask update_mask = 3;
98
99  // The input RestorePlan resource with the updated fields populated to update
100  // the source RestorePlan to.
101  LoggedRestorePlan input_restore_plan = 4;
102
103  // The error code and message.
104  google.rpc.Status error = 5;
105}
106
107// use case 4
108// A log entry when modification(creation, update, deletion) is made to a
109// restore.
110message RestoreChange {
111  // The full name of the Restore resource that is being modified.
112  // Empty for creation.
113  // Format: projects/*/locations/*/restorePlans/*/restores/*
114  string restore = 1;
115
116  // Type of the change is being made.
117  ChangeType change_type = 2;
118
119  // Modification details.
120  google.protobuf.FieldMask update_mask = 3;
121
122  // The input Restore resource with the updated fields populated to update
123  // the source Restore to.
124  LoggedRestore input_restore = 4;
125
126  // The error code and message.
127  google.rpc.Status error = 5;
128}
129
130// The type of changes this log is about.
131enum ChangeType {
132  // Default value, not specified.
133  CHANGE_TYPE_UNSPECIFIED = 0;
134
135  // The resource is created.
136  CREATION = 1;
137
138  // The resource is updated.
139  UPDATE = 2;
140
141  // The resource is deleted.
142  DELETION = 3;
143}
144