|
| 1 | +// Copyright 2024 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.netapp.v1; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/resource.proto"; |
| 21 | +import "google/protobuf/field_mask.proto"; |
| 22 | +import "google/protobuf/timestamp.proto"; |
| 23 | + |
| 24 | +option csharp_namespace = "Google.Cloud.NetApp.V1"; |
| 25 | +option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb"; |
| 26 | +option java_multiple_files = true; |
| 27 | +option java_outer_classname = "QuotaRuleProto"; |
| 28 | +option java_package = "com.google.cloud.netapp.v1"; |
| 29 | +option php_namespace = "Google\\Cloud\\NetApp\\V1"; |
| 30 | +option ruby_package = "Google::Cloud::NetApp::V1"; |
| 31 | + |
| 32 | +// ListQuotaRulesRequest for listing quota rules. |
| 33 | +message ListQuotaRulesRequest { |
| 34 | + // Required. Parent value for ListQuotaRulesRequest |
| 35 | + string parent = 1 [ |
| 36 | + (google.api.field_behavior) = REQUIRED, |
| 37 | + (google.api.resource_reference) = { |
| 38 | + child_type: "netapp.googleapis.com/QuotaRule" |
| 39 | + } |
| 40 | + ]; |
| 41 | + |
| 42 | + // Optional. Requested page size. Server may return fewer items than |
| 43 | + // requested. If unspecified, the server will pick an appropriate default. |
| 44 | + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 45 | + |
| 46 | + // Optional. A token identifying a page of results the server should return. |
| 47 | + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 48 | + |
| 49 | + // Optional. Filtering results |
| 50 | + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; |
| 51 | + |
| 52 | + // Optional. Hint for how to order the results |
| 53 | + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; |
| 54 | +} |
| 55 | + |
| 56 | +// ListQuotaRulesResponse is the response to a ListQuotaRulesRequest. |
| 57 | +message ListQuotaRulesResponse { |
| 58 | + // List of quota rules |
| 59 | + repeated QuotaRule quota_rules = 1; |
| 60 | + |
| 61 | + // A token identifying a page of results the server should return. |
| 62 | + string next_page_token = 2; |
| 63 | + |
| 64 | + // Locations that could not be reached. |
| 65 | + repeated string unreachable = 3; |
| 66 | +} |
| 67 | + |
| 68 | +// GetQuotaRuleRequest for getting a quota rule. |
| 69 | +message GetQuotaRuleRequest { |
| 70 | + // Required. Name of the quota rule |
| 71 | + string name = 1 [ |
| 72 | + (google.api.field_behavior) = REQUIRED, |
| 73 | + (google.api.resource_reference) = { |
| 74 | + type: "netapp.googleapis.com/QuotaRule" |
| 75 | + } |
| 76 | + ]; |
| 77 | +} |
| 78 | + |
| 79 | +// CreateQuotaRuleRequest for creating a quota rule. |
| 80 | +message CreateQuotaRuleRequest { |
| 81 | + // Required. Parent value for CreateQuotaRuleRequest |
| 82 | + string parent = 1 [ |
| 83 | + (google.api.field_behavior) = REQUIRED, |
| 84 | + (google.api.resource_reference) = { |
| 85 | + child_type: "netapp.googleapis.com/QuotaRule" |
| 86 | + } |
| 87 | + ]; |
| 88 | + |
| 89 | + // Required. Fields of the to be created quota rule. |
| 90 | + QuotaRule quota_rule = 2 [(google.api.field_behavior) = REQUIRED]; |
| 91 | + |
| 92 | + // Required. ID of the quota rule to create. Must be unique within the parent |
| 93 | + // resource. Must contain only letters, numbers, underscore and hyphen, with |
| 94 | + // the first character a letter or underscore, the last a letter or underscore |
| 95 | + // or a number, and a 63 character maximum. |
| 96 | + string quota_rule_id = 3 [(google.api.field_behavior) = REQUIRED]; |
| 97 | +} |
| 98 | + |
| 99 | +// UpdateQuotaRuleRequest for updating a quota rule. |
| 100 | +message UpdateQuotaRuleRequest { |
| 101 | + // Optional. Field mask is used to specify the fields to be overwritten in the |
| 102 | + // Quota Rule resource by the update. |
| 103 | + // The fields specified in the update_mask are relative to the resource, not |
| 104 | + // the full request. A field will be overwritten if it is in the mask. If the |
| 105 | + // user does not provide a mask then all fields will be overwritten. |
| 106 | + google.protobuf.FieldMask update_mask = 1 |
| 107 | + [(google.api.field_behavior) = OPTIONAL]; |
| 108 | + |
| 109 | + // Required. The quota rule being updated |
| 110 | + QuotaRule quota_rule = 2 [(google.api.field_behavior) = REQUIRED]; |
| 111 | +} |
| 112 | + |
| 113 | +// DeleteQuotaRuleRequest for deleting a single quota rule. |
| 114 | +message DeleteQuotaRuleRequest { |
| 115 | + // Required. Name of the quota rule. |
| 116 | + string name = 1 [ |
| 117 | + (google.api.field_behavior) = REQUIRED, |
| 118 | + (google.api.resource_reference) = { |
| 119 | + type: "netapp.googleapis.com/QuotaRule" |
| 120 | + } |
| 121 | + ]; |
| 122 | +} |
| 123 | + |
| 124 | +// QuotaRule specifies the maximum disk space a user or group can use within a |
| 125 | +// volume. They can be used for creating default and individual quota rules. |
| 126 | +message QuotaRule { |
| 127 | + option (google.api.resource) = { |
| 128 | + type: "netapp.googleapis.com/QuotaRule" |
| 129 | + pattern: "projects/{project}/locations/{location}/volumes/{volume}/quotaRules/{quota_rule}" |
| 130 | + plural: "quotaRules" |
| 131 | + singular: "quotaRule" |
| 132 | + }; |
| 133 | + |
| 134 | + // Types of Quota Rule |
| 135 | + enum Type { |
| 136 | + // Unspecified type for quota rule |
| 137 | + TYPE_UNSPECIFIED = 0; |
| 138 | + |
| 139 | + // Individual user quota rule |
| 140 | + INDIVIDUAL_USER_QUOTA = 1; |
| 141 | + |
| 142 | + // Individual group quota rule |
| 143 | + INDIVIDUAL_GROUP_QUOTA = 2; |
| 144 | + |
| 145 | + // Default user quota rule |
| 146 | + DEFAULT_USER_QUOTA = 3; |
| 147 | + |
| 148 | + // Default group quota rule |
| 149 | + DEFAULT_GROUP_QUOTA = 4; |
| 150 | + } |
| 151 | + |
| 152 | + // Quota Rule states |
| 153 | + enum State { |
| 154 | + // Unspecified state for quota rule |
| 155 | + STATE_UNSPECIFIED = 0; |
| 156 | + |
| 157 | + // Quota rule is creating |
| 158 | + CREATING = 1; |
| 159 | + |
| 160 | + // Quota rule is updating |
| 161 | + UPDATING = 2; |
| 162 | + |
| 163 | + // Quota rule is deleting |
| 164 | + DELETING = 3; |
| 165 | + |
| 166 | + // Quota rule is ready |
| 167 | + READY = 4; |
| 168 | + |
| 169 | + // Quota rule is in error state. |
| 170 | + ERROR = 5; |
| 171 | + } |
| 172 | + |
| 173 | + // Identifier. The resource name of the quota rule. |
| 174 | + // Format: |
| 175 | + // `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}`. |
| 176 | + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; |
| 177 | + |
| 178 | + // Optional. The quota rule applies to the specified user or group, identified |
| 179 | + // by a Unix UID/GID, Windows SID, or null for default. |
| 180 | + string target = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 181 | + |
| 182 | + // Required. The type of quota rule. |
| 183 | + Type type = 3 [(google.api.field_behavior) = REQUIRED]; |
| 184 | + |
| 185 | + // Required. The maximum allowed disk space in MiB. |
| 186 | + int32 disk_limit_mib = 4 [(google.api.field_behavior) = REQUIRED]; |
| 187 | + |
| 188 | + // Output only. State of the quota rule |
| 189 | + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 190 | + |
| 191 | + // Output only. State details of the quota rule |
| 192 | + string state_details = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 193 | + |
| 194 | + // Output only. Create time of the quota rule |
| 195 | + google.protobuf.Timestamp create_time = 8 |
| 196 | + [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 197 | + |
| 198 | + // Optional. Description of the quota rule |
| 199 | + string description = 9 [(google.api.field_behavior) = OPTIONAL]; |
| 200 | + |
| 201 | + // Optional. Labels of the quota rule |
| 202 | + map<string, string> labels = 10 [(google.api.field_behavior) = OPTIONAL]; |
| 203 | +} |
0 commit comments