|
| 1 | +// Copyright 2025 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 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.gkebackup.v1; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/field_info.proto"; |
| 21 | +import "google/api/resource.proto"; |
| 22 | +import "google/protobuf/timestamp.proto"; |
| 23 | + |
| 24 | +option csharp_namespace = "Google.Cloud.GkeBackup.V1"; |
| 25 | +option go_package = "cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb"; |
| 26 | +option java_multiple_files = true; |
| 27 | +option java_outer_classname = "BackupPlanBindingProto"; |
| 28 | +option java_package = "com.google.cloud.gkebackup.v1"; |
| 29 | +option php_namespace = "Google\\Cloud\\GkeBackup\\V1"; |
| 30 | +option ruby_package = "Google::Cloud::GkeBackup::V1"; |
| 31 | + |
| 32 | +// A BackupPlanBinding binds a BackupPlan with a BackupChannel. |
| 33 | +// This resource is created automatically when a BackupPlan is created using a |
| 34 | +// BackupChannel. This also serves as a holder for cross-project fields |
| 35 | +// that need to be displayed in the current project. |
| 36 | +message BackupPlanBinding { |
| 37 | + option (google.api.resource) = { |
| 38 | + type: "gkebackup.googleapis.com/BackupPlanBinding" |
| 39 | + pattern: "projects/{project}/locations/{location}/backupChannels/{backup_channel}/backupPlanBindings/{backup_plan_binding}" |
| 40 | + plural: "backupPlanBindings" |
| 41 | + singular: "backupPlanBinding" |
| 42 | + }; |
| 43 | + |
| 44 | + // Contains metadata about the backup plan/backup. |
| 45 | + message BackupPlanDetails { |
| 46 | + // State |
| 47 | + enum State { |
| 48 | + // Default first value for Enums. |
| 49 | + STATE_UNSPECIFIED = 0; |
| 50 | + |
| 51 | + // Waiting for cluster state to be RUNNING. |
| 52 | + CLUSTER_PENDING = 1; |
| 53 | + |
| 54 | + // The BackupPlan is in the process of being created. |
| 55 | + PROVISIONING = 2; |
| 56 | + |
| 57 | + // The BackupPlan has successfully been created and is ready for Backups. |
| 58 | + READY = 3; |
| 59 | + |
| 60 | + // BackupPlan creation has failed. |
| 61 | + FAILED = 4; |
| 62 | + |
| 63 | + // The BackupPlan has been deactivated. |
| 64 | + DEACTIVATED = 5; |
| 65 | + |
| 66 | + // The BackupPlan is in the process of being deleted. |
| 67 | + DELETING = 6; |
| 68 | + } |
| 69 | + |
| 70 | + // Output only. The number of Kubernetes Pods backed up in the |
| 71 | + // last successful Backup created via this BackupPlan. |
| 72 | + int32 protected_pod_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 73 | + |
| 74 | + // Output only. State of the BackupPlan. |
| 75 | + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 76 | + |
| 77 | + // Output only. Completion time of the last successful Backup. This is |
| 78 | + // sourced from a successful Backup's complete_time field. |
| 79 | + google.protobuf.Timestamp last_successful_backup_time = 3 |
| 80 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 81 | + |
| 82 | + // Output only. Start time of next scheduled backup under this BackupPlan by |
| 83 | + // either cron_schedule or rpo config. This is sourced from BackupPlan. |
| 84 | + google.protobuf.Timestamp next_scheduled_backup_time = 4 |
| 85 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 86 | + |
| 87 | + // Output only. A number that represents the current risk level of this |
| 88 | + // BackupPlan from RPO perspective with 1 being no risk and 5 being highest |
| 89 | + // risk. |
| 90 | + int32 rpo_risk_level = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 91 | + |
| 92 | + // Output only. The fully qualified name of the last successful Backup |
| 93 | + // created under this BackupPlan. |
| 94 | + // `projects/*/locations/*/backupPlans/*/backups/*` |
| 95 | + string last_successful_backup = 6 |
| 96 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 97 | + } |
| 98 | + |
| 99 | + // Identifier. The fully qualified name of the BackupPlanBinding. |
| 100 | + // `projects/*/locations/*/backupChannels/*/backupPlanBindings/*` |
| 101 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 102 | + |
| 103 | + // Output only. Server generated global unique identifier of |
| 104 | + // [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) |
| 105 | + string uid = 2 [ |
| 106 | + (google.api.field_info).format = UUID4, |
| 107 | + (google.api.field_behavior) = OUTPUT_ONLY |
| 108 | + ]; |
| 109 | + |
| 110 | + // Output only. The timestamp when this binding was created. |
| 111 | + google.protobuf.Timestamp create_time = 3 |
| 112 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 113 | + |
| 114 | + // Output only. The timestamp when this binding was created. |
| 115 | + google.protobuf.Timestamp update_time = 4 |
| 116 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 117 | + |
| 118 | + // Output only. Immutable. The fully qualified name of the BackupPlan bound |
| 119 | + // with the parent BackupChannel. |
| 120 | + // `projects/*/locations/*/backupPlans/{backup_plan}` |
| 121 | + string backup_plan = 5 [ |
| 122 | + (google.api.field_behavior) = IMMUTABLE, |
| 123 | + (google.api.field_behavior) = OUTPUT_ONLY, |
| 124 | + (google.api.resource_reference) = { |
| 125 | + type: "gkebackup.googleapis.com/BackupPlan" |
| 126 | + } |
| 127 | + ]; |
| 128 | + |
| 129 | + // Output only. Immutable. The fully qualified name of the cluster that is |
| 130 | + // being backed up Valid formats: |
| 131 | + // |
| 132 | + // - `projects/*/locations/*/clusters/*` |
| 133 | + // - `projects/*/zones/*/clusters/*` |
| 134 | + string cluster = 6 [ |
| 135 | + (google.api.field_behavior) = IMMUTABLE, |
| 136 | + (google.api.field_behavior) = OUTPUT_ONLY, |
| 137 | + (google.api.resource_reference) = { |
| 138 | + type: "container.googleapis.com/Cluster" |
| 139 | + } |
| 140 | + ]; |
| 141 | + |
| 142 | + // Output only. Contains details about the backup plan/backup. |
| 143 | + BackupPlanDetails backup_plan_details = 7 |
| 144 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 145 | + |
| 146 | + // Output only. `etag` is used for optimistic concurrency control as a way to |
| 147 | + // help prevent simultaneous updates of a BackupPlanBinding from overwriting |
| 148 | + // each other. It is strongly suggested that systems make use of the 'etag' in |
| 149 | + // the read-modify-write cycle to perform BackupPlanBinding updates in |
| 150 | + // order to avoid race conditions: An `etag` is returned in the response to |
| 151 | + // `GetBackupPlanBinding`, and systems are expected to put that etag in |
| 152 | + // the request to `UpdateBackupPlanBinding` or |
| 153 | + // `DeleteBackupPlanBinding` to ensure that their change will be applied |
| 154 | + // to the same version of the resource. |
| 155 | + string etag = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 156 | +} |
0 commit comments