xref: /aosp_15_r20/external/googleapis/google/cloud/gkebackup/v1/gkebackup.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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.v1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/gkebackup/v1/backup.proto";
24import "google/cloud/gkebackup/v1/backup_plan.proto";
25import "google/cloud/gkebackup/v1/restore.proto";
26import "google/cloud/gkebackup/v1/restore_plan.proto";
27import "google/cloud/gkebackup/v1/volume.proto";
28import "google/longrunning/operations.proto";
29import "google/protobuf/empty.proto";
30import "google/protobuf/field_mask.proto";
31import "google/protobuf/timestamp.proto";
32
33option csharp_namespace = "Google.Cloud.GkeBackup.V1";
34option go_package = "cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb";
35option java_multiple_files = true;
36option java_outer_classname = "GKEBackupProto";
37option java_package = "com.google.cloud.gkebackup.v1";
38option php_namespace = "Google\\Cloud\\GkeBackup\\V1";
39option ruby_package = "Google::Cloud::GkeBackup::V1";
40option (google.api.resource_definition) = {
41  type: "container.googleapis.com/Cluster"
42  pattern: "projects/{project}/locations/{location}/clusters/{cluster}"
43};
44option (google.api.resource_definition) = {
45  type: "cloudkms.googleapis.com/CryptoKey"
46  pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
47};
48
49// BackupForGKE allows Kubernetes administrators to configure, execute, and
50// manage backup and restore operations for their GKE clusters.
51service BackupForGKE {
52  option (google.api.default_host) = "gkebackup.googleapis.com";
53  option (google.api.oauth_scopes) =
54      "https://www.googleapis.com/auth/cloud-platform";
55
56  // Creates a new BackupPlan in a given location.
57  rpc CreateBackupPlan(CreateBackupPlanRequest)
58      returns (google.longrunning.Operation) {
59    option (google.api.http) = {
60      post: "/v1/{parent=projects/*/locations/*}/backupPlans"
61      body: "backup_plan"
62    };
63    option (google.api.method_signature) = "parent,backup_plan,backup_plan_id";
64    option (google.longrunning.operation_info) = {
65      response_type: "BackupPlan"
66      metadata_type: "OperationMetadata"
67    };
68  }
69
70  // Lists BackupPlans in a given location.
71  rpc ListBackupPlans(ListBackupPlansRequest)
72      returns (ListBackupPlansResponse) {
73    option (google.api.http) = {
74      get: "/v1/{parent=projects/*/locations/*}/backupPlans"
75    };
76    option (google.api.method_signature) = "parent";
77  }
78
79  // Retrieve the details of a single BackupPlan.
80  rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) {
81    option (google.api.http) = {
82      get: "/v1/{name=projects/*/locations/*/backupPlans/*}"
83    };
84    option (google.api.method_signature) = "name";
85  }
86
87  // Update a BackupPlan.
88  rpc UpdateBackupPlan(UpdateBackupPlanRequest)
89      returns (google.longrunning.Operation) {
90    option (google.api.http) = {
91      patch: "/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}"
92      body: "backup_plan"
93    };
94    option (google.api.method_signature) = "backup_plan,update_mask";
95    option (google.longrunning.operation_info) = {
96      response_type: "BackupPlan"
97      metadata_type: "OperationMetadata"
98    };
99  }
100
101  // Deletes an existing BackupPlan.
102  rpc DeleteBackupPlan(DeleteBackupPlanRequest)
103      returns (google.longrunning.Operation) {
104    option (google.api.http) = {
105      delete: "/v1/{name=projects/*/locations/*/backupPlans/*}"
106    };
107    option (google.api.method_signature) = "name";
108    option (google.longrunning.operation_info) = {
109      response_type: "google.protobuf.Empty"
110      metadata_type: "OperationMetadata"
111    };
112  }
113
114  // Creates a Backup for the given BackupPlan.
115  rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) {
116    option (google.api.http) = {
117      post: "/v1/{parent=projects/*/locations/*/backupPlans/*}/backups"
118      body: "backup"
119    };
120    option (google.api.method_signature) = "parent,backup,backup_id";
121    option (google.longrunning.operation_info) = {
122      response_type: "Backup"
123      metadata_type: "OperationMetadata"
124    };
125  }
126
127  // Lists the Backups for a given BackupPlan.
128  rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
129    option (google.api.http) = {
130      get: "/v1/{parent=projects/*/locations/*/backupPlans/*}/backups"
131    };
132    option (google.api.method_signature) = "parent";
133  }
134
135  // Retrieve the details of a single Backup.
136  rpc GetBackup(GetBackupRequest) returns (Backup) {
137    option (google.api.http) = {
138      get: "/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}"
139    };
140    option (google.api.method_signature) = "name";
141  }
142
143  // Update a Backup.
144  rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) {
145    option (google.api.http) = {
146      patch: "/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}"
147      body: "backup"
148    };
149    option (google.api.method_signature) = "backup,update_mask";
150    option (google.longrunning.operation_info) = {
151      response_type: "Backup"
152      metadata_type: "OperationMetadata"
153    };
154  }
155
156  // Deletes an existing Backup.
157  rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) {
158    option (google.api.http) = {
159      delete: "/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}"
160    };
161    option (google.api.method_signature) = "name";
162    option (google.longrunning.operation_info) = {
163      response_type: "google.protobuf.Empty"
164      metadata_type: "OperationMetadata"
165    };
166  }
167
168  // Lists the VolumeBackups for a given Backup.
169  rpc ListVolumeBackups(ListVolumeBackupsRequest)
170      returns (ListVolumeBackupsResponse) {
171    option (google.api.http) = {
172      get: "/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackups"
173    };
174    option (google.api.method_signature) = "parent";
175  }
176
177  // Retrieve the details of a single VolumeBackup.
178  rpc GetVolumeBackup(GetVolumeBackupRequest) returns (VolumeBackup) {
179    option (google.api.http) = {
180      get: "/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}"
181    };
182    option (google.api.method_signature) = "name";
183  }
184
185  // Creates a new RestorePlan in a given location.
186  rpc CreateRestorePlan(CreateRestorePlanRequest)
187      returns (google.longrunning.Operation) {
188    option (google.api.http) = {
189      post: "/v1/{parent=projects/*/locations/*}/restorePlans"
190      body: "restore_plan"
191    };
192    option (google.api.method_signature) =
193        "parent,restore_plan,restore_plan_id";
194    option (google.longrunning.operation_info) = {
195      response_type: "RestorePlan"
196      metadata_type: "OperationMetadata"
197    };
198  }
199
200  // Lists RestorePlans in a given location.
201  rpc ListRestorePlans(ListRestorePlansRequest)
202      returns (ListRestorePlansResponse) {
203    option (google.api.http) = {
204      get: "/v1/{parent=projects/*/locations/*}/restorePlans"
205    };
206    option (google.api.method_signature) = "parent";
207  }
208
209  // Retrieve the details of a single RestorePlan.
210  rpc GetRestorePlan(GetRestorePlanRequest) returns (RestorePlan) {
211    option (google.api.http) = {
212      get: "/v1/{name=projects/*/locations/*/restorePlans/*}"
213    };
214    option (google.api.method_signature) = "name";
215  }
216
217  // Update a RestorePlan.
218  rpc UpdateRestorePlan(UpdateRestorePlanRequest)
219      returns (google.longrunning.Operation) {
220    option (google.api.http) = {
221      patch: "/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}"
222      body: "restore_plan"
223    };
224    option (google.api.method_signature) = "restore_plan,update_mask";
225    option (google.longrunning.operation_info) = {
226      response_type: "RestorePlan"
227      metadata_type: "OperationMetadata"
228    };
229  }
230
231  // Deletes an existing RestorePlan.
232  rpc DeleteRestorePlan(DeleteRestorePlanRequest)
233      returns (google.longrunning.Operation) {
234    option (google.api.http) = {
235      delete: "/v1/{name=projects/*/locations/*/restorePlans/*}"
236    };
237    option (google.api.method_signature) = "name";
238    option (google.longrunning.operation_info) = {
239      response_type: "google.protobuf.Empty"
240      metadata_type: "OperationMetadata"
241    };
242  }
243
244  // Creates a new Restore for the given RestorePlan.
245  rpc CreateRestore(CreateRestoreRequest)
246      returns (google.longrunning.Operation) {
247    option (google.api.http) = {
248      post: "/v1/{parent=projects/*/locations/*/restorePlans/*}/restores"
249      body: "restore"
250    };
251    option (google.api.method_signature) = "parent,restore,restore_id";
252    option (google.longrunning.operation_info) = {
253      response_type: "Restore"
254      metadata_type: "OperationMetadata"
255    };
256  }
257
258  // Lists the Restores for a given RestorePlan.
259  rpc ListRestores(ListRestoresRequest) returns (ListRestoresResponse) {
260    option (google.api.http) = {
261      get: "/v1/{parent=projects/*/locations/*/restorePlans/*}/restores"
262    };
263    option (google.api.method_signature) = "parent";
264  }
265
266  // Retrieves the details of a single Restore.
267  rpc GetRestore(GetRestoreRequest) returns (Restore) {
268    option (google.api.http) = {
269      get: "/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}"
270    };
271    option (google.api.method_signature) = "name";
272  }
273
274  // Update a Restore.
275  rpc UpdateRestore(UpdateRestoreRequest)
276      returns (google.longrunning.Operation) {
277    option (google.api.http) = {
278      patch: "/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}"
279      body: "restore"
280    };
281    option (google.api.method_signature) = "restore,update_mask";
282    option (google.longrunning.operation_info) = {
283      response_type: "Restore"
284      metadata_type: "OperationMetadata"
285    };
286  }
287
288  // Deletes an existing Restore.
289  rpc DeleteRestore(DeleteRestoreRequest)
290      returns (google.longrunning.Operation) {
291    option (google.api.http) = {
292      delete: "/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}"
293    };
294    option (google.api.method_signature) = "name";
295    option (google.longrunning.operation_info) = {
296      response_type: "google.protobuf.Empty"
297      metadata_type: "OperationMetadata"
298    };
299  }
300
301  // Lists the VolumeRestores for a given Restore.
302  rpc ListVolumeRestores(ListVolumeRestoresRequest)
303      returns (ListVolumeRestoresResponse) {
304    option (google.api.http) = {
305      get: "/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestores"
306    };
307    option (google.api.method_signature) = "parent";
308  }
309
310  // Retrieve the details of a single VolumeRestore.
311  rpc GetVolumeRestore(GetVolumeRestoreRequest) returns (VolumeRestore) {
312    option (google.api.http) = {
313      get: "/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}"
314    };
315    option (google.api.method_signature) = "name";
316  }
317
318  // Retrieve the link to the backupIndex.
319  rpc GetBackupIndexDownloadUrl(GetBackupIndexDownloadUrlRequest)
320      returns (GetBackupIndexDownloadUrlResponse) {
321    option (google.api.http) = {
322      get: "/v1/{backup=projects/*/locations/*/backupPlans/*/backups/*}:getBackupIndexDownloadUrl"
323    };
324    option (google.api.method_signature) = "backup";
325  }
326}
327
328// Represents the metadata of the long-running operation.
329message OperationMetadata {
330  // Output only. The time the operation was created.
331  google.protobuf.Timestamp create_time = 1
332      [(google.api.field_behavior) = OUTPUT_ONLY];
333
334  // Output only. The time the operation finished running.
335  google.protobuf.Timestamp end_time = 2
336      [(google.api.field_behavior) = OUTPUT_ONLY];
337
338  // Output only. Server-defined resource path for the target of the operation.
339  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
340
341  // Output only. Name of the verb executed by the operation.
342  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
343
344  // Output only. Human-readable status of the operation, if any.
345  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
346
347  // Output only. Identifies whether the user has requested cancellation
348  // of the operation. Operations that have successfully been cancelled
349  // have [Operation.error][] value with a
350  // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
351  // `Code.CANCELLED`.
352  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
353
354  // Output only. API version used to start the operation.
355  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
356}
357
358// Request message for CreateBackupPlan.
359message CreateBackupPlanRequest {
360  // Required. The location within which to create the BackupPlan.
361  // Format: `projects/*/locations/*`
362  string parent = 1 [
363    (google.api.field_behavior) = REQUIRED,
364    (google.api.resource_reference) = {
365      type: "locations.googleapis.com/Location"
366    }
367  ];
368
369  // Required. The BackupPlan resource object to create.
370  BackupPlan backup_plan = 2 [(google.api.field_behavior) = REQUIRED];
371
372  // Required. The client-provided short name for the BackupPlan resource.
373  // This name must:
374  //
375  // - be between 1 and 63 characters long (inclusive)
376  // - consist of only lower-case ASCII letters, numbers, and dashes
377  // - start with a lower-case letter
378  // - end with a lower-case letter or number
379  // - be unique within the set of BackupPlans in this location
380  string backup_plan_id = 3 [(google.api.field_behavior) = REQUIRED];
381}
382
383// Request message for ListBackupPlans.
384message ListBackupPlansRequest {
385  // Required. The location that contains the BackupPlans to list.
386  // Format: `projects/*/locations/*`
387  string parent = 1 [
388    (google.api.field_behavior) = REQUIRED,
389    (google.api.resource_reference) = {
390      type: "locations.googleapis.com/Location"
391    }
392  ];
393
394  // Optional. The target number of results to return in a single response.
395  // If not specified, a default value will be chosen by the service.
396  // Note that the response may include a partial list and a caller should
397  // only rely on the response's
398  // [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token]
399  // to determine if there are more instances left to be queried.
400  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
401
402  // Optional. The value of
403  // [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token]
404  // received from a previous `ListBackupPlans` call.
405  // Provide this to retrieve the subsequent page in a multi-page list of
406  // results. When paginating, all other parameters provided to
407  // `ListBackupPlans` must match the call that provided the page token.
408  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
409
410  // Optional. Field match expression used to filter the results.
411  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
412
413  // Optional. Field by which to sort the results.
414  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
415}
416
417// Response message for ListBackupPlans.
418message ListBackupPlansResponse {
419  // The list of BackupPlans matching the given criteria.
420  repeated BackupPlan backup_plans = 1;
421
422  // A token which may be sent as
423  // [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token]
424  // in a subsequent `ListBackupPlans` call to retrieve the next page of
425  // results. If this field is omitted or empty, then there are no more results
426  // to return.
427  string next_page_token = 2;
428
429  // Locations that could not be reached.
430  repeated string unreachable = 3;
431}
432
433// Request message for GetBackupPlan.
434message GetBackupPlanRequest {
435  // Required. Fully qualified BackupPlan name.
436  // Format: `projects/*/locations/*/backupPlans/*`
437  string name = 1 [
438    (google.api.field_behavior) = REQUIRED,
439    (google.api.resource_reference) = {
440      type: "gkebackup.googleapis.com/BackupPlan"
441    }
442  ];
443}
444
445// Request message for UpdateBackupPlan.
446message UpdateBackupPlanRequest {
447  // Required. A new version of the BackupPlan resource that contains updated
448  // fields. This may be sparsely populated if an `update_mask` is provided.
449  BackupPlan backup_plan = 1 [(google.api.field_behavior) = REQUIRED];
450
451  // Optional. This is used to specify the fields to be overwritten in the
452  // BackupPlan targeted for update. The values for each of these
453  // updated fields will be taken from the `backup_plan` provided
454  // with this request. Field names are relative to the root of the resource
455  // (e.g., `description`, `backup_config.include_volume_data`, etc.)
456  // If no `update_mask` is provided, all fields in `backup_plan` will be
457  // written to the target BackupPlan resource.
458  // Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored
459  // and are not used to update the target BackupPlan.
460  google.protobuf.FieldMask update_mask = 2
461      [(google.api.field_behavior) = OPTIONAL];
462}
463
464// Request message for DeleteBackupPlan.
465message DeleteBackupPlanRequest {
466  // Required. Fully qualified BackupPlan name.
467  // Format: `projects/*/locations/*/backupPlans/*`
468  string name = 1 [
469    (google.api.field_behavior) = REQUIRED,
470    (google.api.resource_reference) = {
471      type: "gkebackup.googleapis.com/BackupPlan"
472    }
473  ];
474
475  // Optional. If provided, this value must match the current value of the
476  // target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field
477  // or the request is rejected.
478  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
479}
480
481// Request message for CreateBackup.
482message CreateBackupRequest {
483  // Required. The BackupPlan within which to create the Backup.
484  // Format: `projects/*/locations/*/backupPlans/*`
485  string parent = 1 [
486    (google.api.field_behavior) = REQUIRED,
487    (google.api.resource_reference) = {
488      type: "gkebackup.googleapis.com/BackupPlan"
489    }
490  ];
491
492  // Optional. The Backup resource to create.
493  Backup backup = 2 [(google.api.field_behavior) = OPTIONAL];
494
495  // Optional. The client-provided short name for the Backup resource.
496  // This name must:
497  //
498  // - be between 1 and 63 characters long (inclusive)
499  // - consist of only lower-case ASCII letters, numbers, and dashes
500  // - start with a lower-case letter
501  // - end with a lower-case letter or number
502  // - be unique within the set of Backups in this BackupPlan
503  string backup_id = 3 [(google.api.field_behavior) = OPTIONAL];
504}
505
506// Request message for ListBackups.
507message ListBackupsRequest {
508  // Required. The BackupPlan that contains the Backups to list.
509  // Format: `projects/*/locations/*/backupPlans/*`
510  string parent = 1 [
511    (google.api.field_behavior) = REQUIRED,
512    (google.api.resource_reference) = {
513      type: "gkebackup.googleapis.com/BackupPlan"
514    }
515  ];
516
517  // Optional. The target number of results to return in a single response.
518  // If not specified, a default value will be chosen by the service.
519  // Note that the response may include a partial list and a caller should
520  // only rely on the response's
521  // [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token]
522  // to determine if there are more instances left to be queried.
523  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
524
525  // Optional. The value of
526  // [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token]
527  // received from a previous `ListBackups` call.
528  // Provide this to retrieve the subsequent page in a multi-page list of
529  // results. When paginating, all other parameters provided to
530  // `ListBackups` must match the call that provided the page token.
531  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
532
533  // Optional. Field match expression used to filter the results.
534  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
535
536  // Optional. Field by which to sort the results.
537  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
538}
539
540// Response message for ListBackups.
541message ListBackupsResponse {
542  // The list of Backups matching the given criteria.
543  repeated Backup backups = 1;
544
545  // A token which may be sent as
546  // [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in a
547  // subsequent `ListBackups` call to retrieve the next page of results. If this
548  // field is omitted or empty, then there are no more results to return.
549  string next_page_token = 2;
550}
551
552// Request message for GetBackup.
553message GetBackupRequest {
554  // Required. Full name of the Backup resource.
555  // Format: `projects/*/locations/*/backupPlans/*/backups/*`
556  string name = 1 [
557    (google.api.field_behavior) = REQUIRED,
558    (google.api.resource_reference) = {
559      type: "gkebackup.googleapis.com/Backup"
560    }
561  ];
562}
563
564// Request message for UpdateBackup.
565message UpdateBackupRequest {
566  // Required. A new version of the Backup resource that contains updated
567  // fields. This may be sparsely populated if an `update_mask` is provided.
568  Backup backup = 1 [(google.api.field_behavior) = REQUIRED];
569
570  // Optional. This is used to specify the fields to be overwritten in the
571  // Backup targeted for update. The values for each of these
572  // updated fields will be taken from the `backup_plan` provided
573  // with this request. Field names are relative to the root of the resource.
574  // If no `update_mask` is provided, all fields in `backup` will be
575  // written to the target Backup resource.
576  // Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored
577  // and are not used to update the target Backup.
578  google.protobuf.FieldMask update_mask = 2
579      [(google.api.field_behavior) = OPTIONAL];
580}
581
582// Request message for DeleteBackup.
583message DeleteBackupRequest {
584  // Required. Name of the Backup resource.
585  // Format: `projects/*/locations/*/backupPlans/*/backups/*`
586  string name = 1 [
587    (google.api.field_behavior) = REQUIRED,
588    (google.api.resource_reference) = {
589      type: "gkebackup.googleapis.com/Backup"
590    }
591  ];
592
593  // Optional. If provided, this value must match the current value of the
594  // target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the
595  // request is rejected.
596  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
597
598  // Optional. If set to true, any VolumeBackups below this Backup will also be
599  // deleted. Otherwise, the request will only succeed if the Backup has no
600  // VolumeBackups.
601  bool force = 3 [(google.api.field_behavior) = OPTIONAL];
602}
603
604// Request message for ListVolumeBackups.
605message ListVolumeBackupsRequest {
606  // Required. The Backup that contains the VolumeBackups to list.
607  // Format: `projects/*/locations/*/backupPlans/*/backups/*`
608  string parent = 1 [
609    (google.api.field_behavior) = REQUIRED,
610    (google.api.resource_reference) = {
611      type: "gkebackup.googleapis.com/Backup"
612    }
613  ];
614
615  // Optional. The target number of results to return in a single response.
616  // If not specified, a default value will be chosen by the service.
617  // Note that the response may include a partial list and a caller should
618  // only rely on the response's
619  // [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token]
620  // to determine if there are more instances left to be queried.
621  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
622
623  // Optional. The value of
624  // [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token]
625  // received from a previous `ListVolumeBackups` call.
626  // Provide this to retrieve the subsequent page in a multi-page list of
627  // results. When paginating, all other parameters provided to
628  // `ListVolumeBackups` must match the call that provided the page token.
629  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
630
631  // Optional. Field match expression used to filter the results.
632  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
633
634  // Optional. Field by which to sort the results.
635  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
636}
637
638// Response message for ListVolumeBackups.
639message ListVolumeBackupsResponse {
640  // The list of VolumeBackups matching the given criteria.
641  repeated VolumeBackup volume_backups = 1;
642
643  // A token which may be sent as
644  // [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token]
645  // in a subsequent `ListVolumeBackups` call to retrieve the next page of
646  // results. If this field is omitted or empty, then there are no more results
647  // to return.
648  string next_page_token = 2;
649}
650
651// Request message for GetVolumeBackup.
652message GetVolumeBackupRequest {
653  // Required. Full name of the VolumeBackup resource.
654  // Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`
655  string name = 1 [
656    (google.api.field_behavior) = REQUIRED,
657    (google.api.resource_reference) = {
658      type: "gkebackup.googleapis.com/VolumeBackup"
659    }
660  ];
661}
662
663// Request message for CreateRestorePlan.
664message CreateRestorePlanRequest {
665  // Required. The location within which to create the RestorePlan.
666  // Format: `projects/*/locations/*`
667  string parent = 1 [
668    (google.api.field_behavior) = REQUIRED,
669    (google.api.resource_reference) = {
670      type: "locations.googleapis.com/Location"
671    }
672  ];
673
674  // Required. The RestorePlan resource object to create.
675  RestorePlan restore_plan = 2 [(google.api.field_behavior) = REQUIRED];
676
677  // Required. The client-provided short name for the RestorePlan resource.
678  // This name must:
679  //
680  // - be between 1 and 63 characters long (inclusive)
681  // - consist of only lower-case ASCII letters, numbers, and dashes
682  // - start with a lower-case letter
683  // - end with a lower-case letter or number
684  // - be unique within the set of RestorePlans in this location
685  string restore_plan_id = 3 [(google.api.field_behavior) = REQUIRED];
686}
687
688// Request message for ListRestorePlans.
689message ListRestorePlansRequest {
690  // Required. The location that contains the RestorePlans to list.
691  // Format: `projects/*/locations/*`
692  string parent = 1 [
693    (google.api.field_behavior) = REQUIRED,
694    (google.api.resource_reference) = {
695      type: "locations.googleapis.com/Location"
696    }
697  ];
698
699  // Optional. The target number of results to return in a single response.
700  // If not specified, a default value will be chosen by the service.
701  // Note that the response may include a partial list and a caller should
702  // only rely on the response's
703  // [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token]
704  // to determine if there are more instances left to be queried.
705  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
706
707  // Optional. The value of
708  // [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token]
709  // received from a previous `ListRestorePlans` call.
710  // Provide this to retrieve the subsequent page in a multi-page list of
711  // results. When paginating, all other parameters provided to
712  // `ListRestorePlans` must match the call that provided the page token.
713  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
714
715  // Optional. Field match expression used to filter the results.
716  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
717
718  // Optional. Field by which to sort the results.
719  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
720}
721
722// Response message for ListRestorePlans.
723message ListRestorePlansResponse {
724  // The list of RestorePlans matching the given criteria.
725  repeated RestorePlan restore_plans = 1;
726
727  // A token which may be sent as
728  // [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token]
729  // in a subsequent `ListRestorePlans` call to retrieve the next page of
730  // results. If this field is omitted or empty, then there are no more results
731  // to return.
732  string next_page_token = 2;
733
734  // Locations that could not be reached.
735  repeated string unreachable = 3;
736}
737
738// Request message for GetRestorePlan.
739message GetRestorePlanRequest {
740  // Required. Fully qualified RestorePlan name.
741  // Format: `projects/*/locations/*/restorePlans/*`
742  string name = 1 [
743    (google.api.field_behavior) = REQUIRED,
744    (google.api.resource_reference) = {
745      type: "gkebackup.googleapis.com/RestorePlan"
746    }
747  ];
748}
749
750// Request message for UpdateRestorePlan.
751message UpdateRestorePlanRequest {
752  // Required. A new version of the RestorePlan resource that contains updated
753  // fields. This may be sparsely populated if an `update_mask` is provided.
754  RestorePlan restore_plan = 1 [(google.api.field_behavior) = REQUIRED];
755
756  // Optional. This is used to specify the fields to be overwritten in the
757  // RestorePlan targeted for update. The values for each of these
758  // updated fields will be taken from the `restore_plan` provided
759  // with this request. Field names are relative to the root of the resource.
760  // If no `update_mask` is provided, all fields in `restore_plan` will be
761  // written to the target RestorePlan resource.
762  // Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored
763  // and are not used to update the target RestorePlan.
764  google.protobuf.FieldMask update_mask = 2
765      [(google.api.field_behavior) = OPTIONAL];
766}
767
768// Request message for DeleteRestorePlan.
769message DeleteRestorePlanRequest {
770  // Required. Fully qualified RestorePlan name.
771  // Format: `projects/*/locations/*/restorePlans/*`
772  string name = 1 [
773    (google.api.field_behavior) = REQUIRED,
774    (google.api.resource_reference) = {
775      type: "gkebackup.googleapis.com/RestorePlan"
776    }
777  ];
778
779  // Optional. If provided, this value must match the current value of the
780  // target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag]
781  // field or the request is rejected.
782  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
783
784  // Optional. If set to true, any Restores below this RestorePlan will also be
785  // deleted. Otherwise, the request will only succeed if the RestorePlan has no
786  // Restores.
787  bool force = 3 [(google.api.field_behavior) = OPTIONAL];
788}
789
790// Request message for CreateRestore.
791message CreateRestoreRequest {
792  // Required. The RestorePlan within which to create the Restore.
793  // Format: `projects/*/locations/*/restorePlans/*`
794  string parent = 1 [
795    (google.api.field_behavior) = REQUIRED,
796    (google.api.resource_reference) = {
797      type: "gkebackup.googleapis.com/RestorePlan"
798    }
799  ];
800
801  // Required. The restore resource to create.
802  Restore restore = 2 [(google.api.field_behavior) = REQUIRED];
803
804  // Required. The client-provided short name for the Restore resource.
805  // This name must:
806  //
807  // - be between 1 and 63 characters long (inclusive)
808  // - consist of only lower-case ASCII letters, numbers, and dashes
809  // - start with a lower-case letter
810  // - end with a lower-case letter or number
811  // - be unique within the set of Restores in this RestorePlan.
812  string restore_id = 3 [(google.api.field_behavior) = REQUIRED];
813}
814
815// Request message for ListRestores.
816message ListRestoresRequest {
817  // Required. The RestorePlan that contains the Restores to list.
818  // Format: `projects/*/locations/*/restorePlans/*`
819  string parent = 1 [
820    (google.api.field_behavior) = REQUIRED,
821    (google.api.resource_reference) = {
822      type: "gkebackup.googleapis.com/RestorePlan"
823    }
824  ];
825
826  // Optional. The target number of results to return in a single response.
827  // If not specified, a default value will be chosen by the service.
828  // Note that the response may include a partial list and a caller should
829  // only rely on the response's
830  // [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token]
831  // to determine if there are more instances left to be queried.
832  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
833
834  // Optional. The value of
835  // [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token]
836  // received from a previous `ListRestores` call.
837  // Provide this to retrieve the subsequent page in a multi-page list of
838  // results. When paginating, all other parameters provided to `ListRestores`
839  // must match the call that provided the page token.
840  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
841
842  // Optional. Field match expression used to filter the results.
843  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
844
845  // Optional. Field by which to sort the results.
846  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
847}
848
849// Response message for ListRestores.
850message ListRestoresResponse {
851  // The list of Restores matching the given criteria.
852  repeated Restore restores = 1;
853
854  // A token which may be sent as
855  // [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token] in a
856  // subsequent `ListRestores` call to retrieve the next page of results. If
857  // this field is omitted or empty, then there are no more results to return.
858  string next_page_token = 2;
859
860  // Locations that could not be reached.
861  repeated string unreachable = 3;
862}
863
864// Request message for GetRestore.
865message GetRestoreRequest {
866  // Required. Name of the restore resource.
867  // Format: `projects/*/locations/*/restorePlans/*/restores/*`
868  string name = 1 [
869    (google.api.field_behavior) = REQUIRED,
870    (google.api.resource_reference) = {
871      type: "gkebackup.googleapis.com/Restore"
872    }
873  ];
874}
875
876// Request message for UpdateRestore.
877message UpdateRestoreRequest {
878  // Required. A new version of the Restore resource that contains updated
879  // fields. This may be sparsely populated if an `update_mask` is provided.
880  Restore restore = 1 [(google.api.field_behavior) = REQUIRED];
881
882  // Optional. This is used to specify the fields to be overwritten in the
883  // Restore targeted for update. The values for each of these
884  // updated fields will be taken from the `restore` provided
885  // with this request. Field names are relative to the root of the resource.
886  // If no `update_mask` is provided, all fields in `restore` will be
887  // written to the target Restore resource.
888  // Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored
889  // and are not used to update the target Restore.
890  google.protobuf.FieldMask update_mask = 2
891      [(google.api.field_behavior) = OPTIONAL];
892}
893
894// Request message for DeleteRestore.
895message DeleteRestoreRequest {
896  // Required. Full name of the Restore
897  // Format: `projects/*/locations/*/restorePlans/*/restores/*`
898  string name = 1 [
899    (google.api.field_behavior) = REQUIRED,
900    (google.api.resource_reference) = {
901      type: "gkebackup.googleapis.com/Restore"
902    }
903  ];
904
905  // Optional. If provided, this value must match the current value of the
906  // target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or
907  // the request is rejected.
908  string etag = 2 [(google.api.field_behavior) = OPTIONAL];
909
910  // Optional. If set to true, any VolumeRestores below this restore will also
911  // be deleted. Otherwise, the request will only succeed if the restore has no
912  // VolumeRestores.
913  bool force = 3 [(google.api.field_behavior) = OPTIONAL];
914}
915
916// Request message for ListVolumeRestores.
917message ListVolumeRestoresRequest {
918  // Required. The Restore that contains the VolumeRestores to list.
919  // Format: `projects/*/locations/*/restorePlans/*/restores/*`
920  string parent = 1 [
921    (google.api.field_behavior) = REQUIRED,
922    (google.api.resource_reference) = {
923      type: "gkebackup.googleapis.com/Restore"
924    }
925  ];
926
927  // Optional. The target number of results to return in a single response.
928  // If not specified, a default value will be chosen by the service.
929  // Note that the response may include a partial list and a caller should
930  // only rely on the response's
931  // [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token]
932  // to determine if there are more instances left to be queried.
933  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
934
935  // Optional. The value of
936  // [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token]
937  // received from a previous `ListVolumeRestores` call.
938  // Provide this to retrieve the subsequent page in a multi-page list of
939  // results. When paginating, all other parameters provided to
940  // `ListVolumeRestores` must match the call that provided the page token.
941  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
942
943  // Optional. Field match expression used to filter the results.
944  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
945
946  // Optional. Field by which to sort the results.
947  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
948}
949
950// Response message for ListVolumeRestores.
951message ListVolumeRestoresResponse {
952  // The list of VolumeRestores matching the given criteria.
953  repeated VolumeRestore volume_restores = 1;
954
955  // A token which may be sent as
956  // [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token]
957  // in a subsequent `ListVolumeRestores` call to retrieve the next page of
958  // results. If this field is omitted or empty, then there are no more results
959  // to return.
960  string next_page_token = 2;
961}
962
963// Request message for GetVolumeRestore.
964message GetVolumeRestoreRequest {
965  // Required. Full name of the VolumeRestore resource.
966  // Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
967  string name = 1 [
968    (google.api.field_behavior) = REQUIRED,
969    (google.api.resource_reference) = {
970      type: "gkebackup.googleapis.com/VolumeRestore"
971    }
972  ];
973}
974
975// Request message for GetBackupIndexDownloadUrl.
976message GetBackupIndexDownloadUrlRequest {
977  // Required. Full name of Backup resource.
978  // Format:
979  // projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
980  string backup = 1 [
981    (google.api.field_behavior) = REQUIRED,
982    (google.api.resource_reference) = {
983      type: "gkebackup.googleapis.com/Backup"
984    }
985  ];
986}
987
988// Response message for GetBackupIndexDownloadUrl.
989message GetBackupIndexDownloadUrlResponse {
990  string signed_url = 1 [(google.api.field_behavior) = REQUIRED];
991}
992