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.netapp.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/field_mask.proto"; 22import "google/protobuf/timestamp.proto"; 23 24option csharp_namespace = "Google.Cloud.NetApp.V1"; 25option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; 26option java_multiple_files = true; 27option java_outer_classname = "BackupVaultProto"; 28option java_package = "com.google.cloud.netapp.v1"; 29option php_namespace = "Google\\Cloud\\NetApp\\V1"; 30option ruby_package = "Google::Cloud::NetApp::V1"; 31 32// A NetApp BackupVault. 33message BackupVault { 34 option (google.api.resource) = { 35 type: "netapp.googleapis.com/BackupVault" 36 pattern: "projects/{project}/locations/{location}/backupVaults/{backup_vault}" 37 plural: "backupVaults" 38 singular: "backupVault" 39 }; 40 41 // The Backup Vault States 42 enum State { 43 // State not set. 44 STATE_UNSPECIFIED = 0; 45 46 // BackupVault is being created. 47 CREATING = 1; 48 49 // BackupVault is available for use. 50 READY = 2; 51 52 // BackupVault is being deleted. 53 DELETING = 3; 54 55 // BackupVault is not valid and cannot be used. 56 ERROR = 4; 57 58 // BackupVault is being updated. 59 UPDATING = 5; 60 } 61 62 // Identifier. The resource name of the backup vault. 63 // Format: 64 // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. 65 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 66 67 // Output only. The backup vault state. 68 State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 69 70 // Output only. Create time of the backup vault. 71 google.protobuf.Timestamp create_time = 3 72 [(google.api.field_behavior) = OUTPUT_ONLY]; 73 74 // Description of the backup vault. 75 string description = 4; 76 77 // Resource labels to represent user provided metadata. 78 map<string, string> labels = 5; 79} 80 81// GetBackupVaultRequest gets the state of a backupVault. 82message GetBackupVaultRequest { 83 // Required. The backupVault resource name, in the format 84 // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` 85 string name = 1 [ 86 (google.api.field_behavior) = REQUIRED, 87 (google.api.resource_reference) = { 88 type: "netapp.googleapis.com/BackupVault" 89 } 90 ]; 91} 92 93// ListBackupVaultsRequest lists backupVaults. 94message ListBackupVaultsRequest { 95 // Required. The location for which to retrieve backupVault information, 96 // in the format 97 // `projects/{project_id}/locations/{location}`. 98 string parent = 1 [ 99 (google.api.field_behavior) = REQUIRED, 100 (google.api.resource_reference) = { 101 child_type: "netapp.googleapis.com/BackupVault" 102 } 103 ]; 104 105 // The maximum number of items to return. 106 int32 page_size = 2; 107 108 // The next_page_token value to use if there are additional 109 // results to retrieve for this list request. 110 string page_token = 3; 111 112 // Sort results. Supported values are "name", "name desc" or "" (unsorted). 113 string order_by = 4; 114 115 // List filter. 116 string filter = 5; 117} 118 119// ListBackupVaultsResponse is the result of ListBackupVaultsRequest. 120message ListBackupVaultsResponse { 121 // A list of backupVaults in the project for the specified location. 122 repeated BackupVault backup_vaults = 1; 123 124 // The token you can use to retrieve the next page of results. Not returned 125 // if there are no more results in the list. 126 string next_page_token = 2; 127 128 // Locations that could not be reached. 129 repeated string unreachable = 3; 130} 131 132// CreateBackupVaultRequest creates a backup vault. 133message CreateBackupVaultRequest { 134 // Required. The location to create the backup vaults, in the format 135 // `projects/{project_id}/locations/{location}` 136 string parent = 1 [ 137 (google.api.field_behavior) = REQUIRED, 138 (google.api.resource_reference) = { 139 child_type: "netapp.googleapis.com/BackupVault" 140 } 141 ]; 142 143 // Required. The ID to use for the backupVault. 144 // The ID must be unique within the specified location. 145 // The max supported length is 63 characters. 146 // This value must start with a lowercase letter followed by up to 62 147 // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. 148 // Values that do not match this pattern will trigger an INVALID_ARGUMENT 149 // error. 150 string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED]; 151 152 // Required. A backupVault resource 153 BackupVault backup_vault = 3 [(google.api.field_behavior) = REQUIRED]; 154} 155 156// DeleteBackupVaultRequest deletes a backupVault. 157message DeleteBackupVaultRequest { 158 // Required. The backupVault resource name, in the format 159 // `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` 160 string name = 1 [ 161 (google.api.field_behavior) = REQUIRED, 162 (google.api.resource_reference) = { 163 type: "netapp.googleapis.com/BackupVault" 164 } 165 ]; 166} 167 168// UpdateBackupVaultRequest updates description and/or labels for a backupVault. 169message UpdateBackupVaultRequest { 170 // Required. Field mask is used to specify the fields to be overwritten in the 171 // Backup resource to be updated. 172 // The fields specified in the update_mask are relative to the resource, not 173 // the full request. A field will be overwritten if it is in the mask. If the 174 // user does not provide a mask then all fields will be overwritten. 175 google.protobuf.FieldMask update_mask = 1 176 [(google.api.field_behavior) = REQUIRED]; 177 178 // Required. The backupVault being updated 179 BackupVault backup_vault = 2 [(google.api.field_behavior) = REQUIRED]; 180} 181