From 4e0515ad90003d4e792e62e4a5edd1c028f702b5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 28 Jan 2025 00:32:28 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2985) --- .../v1alpha1/managedidentities-api.json | 14 +- .../v1alpha1/managedidentities-gen.go | 23 +- .../v1beta1/managedidentities-api.json | 14 +- .../v1beta1/managedidentities-gen.go | 23 +- netapp/v1/netapp-api.json | 287 ++++++- netapp/v1/netapp-gen.go | 707 ++++++++++++++++++ netapp/v1beta1/netapp-api.json | 287 ++++++- netapp/v1beta1/netapp-gen.go | 707 ++++++++++++++++++ redis/v1beta1/redis-api.json | 14 +- redis/v1beta1/redis-gen.go | 3 + 10 files changed, 2040 insertions(+), 39 deletions(-) diff --git a/managedidentities/v1alpha1/managedidentities-api.json b/managedidentities/v1alpha1/managedidentities-api.json index c936aba5fbc..63c202b2704 100644 --- a/managedidentities/v1alpha1/managedidentities-api.json +++ b/managedidentities/v1alpha1/managedidentities-api.json @@ -1134,7 +1134,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1alpha1/projects/{projectsId}/locations/global/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "managedidentities.projects.locations.global.operations.cancel", @@ -1515,7 +1515,7 @@ } } }, - "revision": "20240530", + "revision": "20250116", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -2722,7 +2722,7 @@ "type": "string" }, "cancelRequested": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have google.longrunning.Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "readOnly": true, "type": "boolean" }, @@ -3034,22 +3034,22 @@ "id": "TimeOfDay", "properties": { "hours": { - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "description": "Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", "format": "int32", "type": "integer" }, "minutes": { - "description": "Minutes of hour of day. Must be from 0 to 59.", + "description": "Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.", "format": "int32", "type": "integer" }, "nanos": { - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "description": "Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.", "format": "int32", "type": "integer" }, "seconds": { - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "description": "Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.", "format": "int32", "type": "integer" } diff --git a/managedidentities/v1alpha1/managedidentities-gen.go b/managedidentities/v1alpha1/managedidentities-gen.go index 18c2dbe53c3..56e25beec03 100644 --- a/managedidentities/v1alpha1/managedidentities-gen.go +++ b/managedidentities/v1alpha1/managedidentities-gen.go @@ -1824,8 +1824,8 @@ type OperationMetadata struct { ApiVersion string `json:"apiVersion,omitempty"` // CancelRequested: Output only. Identifies whether the user has requested // cancellation of the operation. Operations that have been cancelled - // successfully have Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. + // successfully have google.longrunning.Operation.error value with a + // google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. CancelRequested bool `json:"cancelRequested,omitempty"` // CreateTime: Output only. The time the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -2263,16 +2263,19 @@ func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { // significant or are specified elsewhere. An API may choose to allow leap // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. type TimeOfDay struct { - // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may - // choose to allow the value "24:00:00" for scenarios like business closing - // time. + // Hours: Hours of a day in 24 hour format. Must be greater than or equal to 0 + // and typically must be less than or equal to 23. An API may choose to allow + // the value "24:00:00" for scenarios like business closing time. Hours int64 `json:"hours,omitempty"` - // Minutes: Minutes of hour of day. Must be from 0 to 59. + // Minutes: Minutes of an hour. Must be greater than or equal to 0 and less + // than or equal to 59. Minutes int64 `json:"minutes,omitempty"` - // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + // Nanos: Fractions of seconds, in nanoseconds. Must be greater than or equal + // to 0 and less than or equal to 999,999,999. Nanos int64 `json:"nanos,omitempty"` - // Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An - // API may allow the value 60 if it allows leap-seconds. + // Seconds: Seconds of a minute. Must be greater than or equal to 0 and + // typically must be less than or equal to 59. An API may allow the value 60 if + // it allows leap-seconds. Seconds int64 `json:"seconds,omitempty"` // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -6284,7 +6287,7 @@ type ProjectsLocationsGlobalOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/managedidentities/v1beta1/managedidentities-api.json b/managedidentities/v1beta1/managedidentities-api.json index f9fc5d90ed5..a3355759089 100644 --- a/managedidentities/v1beta1/managedidentities-api.json +++ b/managedidentities/v1beta1/managedidentities-api.json @@ -1134,7 +1134,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/projects/{projectsId}/locations/global/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "managedidentities.projects.locations.global.operations.cancel", @@ -1515,7 +1515,7 @@ } } }, - "revision": "20240530", + "revision": "20250116", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -2732,7 +2732,7 @@ "type": "string" }, "cancelRequested": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have google.longrunning.Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "readOnly": true, "type": "boolean" }, @@ -3054,22 +3054,22 @@ "id": "TimeOfDay", "properties": { "hours": { - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "description": "Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", "format": "int32", "type": "integer" }, "minutes": { - "description": "Minutes of hour of day. Must be from 0 to 59.", + "description": "Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59.", "format": "int32", "type": "integer" }, "nanos": { - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "description": "Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999.", "format": "int32", "type": "integer" }, "seconds": { - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "description": "Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds.", "format": "int32", "type": "integer" } diff --git a/managedidentities/v1beta1/managedidentities-gen.go b/managedidentities/v1beta1/managedidentities-gen.go index 9ccd75b82fb..bcc27af8758 100644 --- a/managedidentities/v1beta1/managedidentities-gen.go +++ b/managedidentities/v1beta1/managedidentities-gen.go @@ -1831,8 +1831,8 @@ type OperationMetadata struct { ApiVersion string `json:"apiVersion,omitempty"` // CancelRequested: Output only. Identifies whether the user has requested // cancellation of the operation. Operations that have been cancelled - // successfully have Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. + // successfully have google.longrunning.Operation.error value with a + // google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. CancelRequested bool `json:"cancelRequested,omitempty"` // CreateTime: Output only. The time the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -2277,16 +2277,19 @@ func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { // significant or are specified elsewhere. An API may choose to allow leap // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. type TimeOfDay struct { - // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may - // choose to allow the value "24:00:00" for scenarios like business closing - // time. + // Hours: Hours of a day in 24 hour format. Must be greater than or equal to 0 + // and typically must be less than or equal to 23. An API may choose to allow + // the value "24:00:00" for scenarios like business closing time. Hours int64 `json:"hours,omitempty"` - // Minutes: Minutes of hour of day. Must be from 0 to 59. + // Minutes: Minutes of an hour. Must be greater than or equal to 0 and less + // than or equal to 59. Minutes int64 `json:"minutes,omitempty"` - // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + // Nanos: Fractions of seconds, in nanoseconds. Must be greater than or equal + // to 0 and less than or equal to 999,999,999. Nanos int64 `json:"nanos,omitempty"` - // Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An - // API may allow the value 60 if it allows leap-seconds. + // Seconds: Seconds of a minute. Must be greater than or equal to 0 and + // typically must be less than or equal to 59. An API may allow the value 60 if + // it allows leap-seconds. Seconds int64 `json:"seconds,omitempty"` // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -6292,7 +6295,7 @@ type ProjectsLocationsGlobalOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/netapp/v1/netapp-api.json b/netapp/v1/netapp-api.json index 8d02c1714b5..a3df49512aa 100644 --- a/netapp/v1/netapp-api.json +++ b/netapp/v1/netapp-api.json @@ -1616,6 +1616,173 @@ } }, "resources": { + "quotaRules": { + "methods": { + "create": { + "description": "Creates a new quota rule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.quotaRules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent value for CreateQuotaRuleRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + }, + "quotaRuleId": { + "description": "Required. ID of the quota rule to create. Must be unique within the parent resource. Must contain only letters, numbers, underscore and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/quotaRules", + "request": { + "$ref": "QuotaRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a quota rule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.volumes.quotaRules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the quota rule.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns details of the specified quota rule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.quotaRules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the quota rule", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "QuotaRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns list of all quota rules in a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.quotaRules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListQuotaRulesRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/quotaRules", + "response": { + "$ref": "ListQuotaRulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a quota rule.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.volumes.quotaRules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the quota rule. Format: `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Quota Rule resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "QuotaRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "replications": { "methods": { "create": { @@ -2097,7 +2264,7 @@ } } }, - "revision": "20250116", + "revision": "20250123", "rootUrl": "https://netapp.googleapis.com/", "schemas": { "ActiveDirectory": { @@ -2619,6 +2786,18 @@ "description": "Optional. Temporary passphrase generated to accept cluster peering command.", "type": "string" }, + "peerClusterName": { + "description": "Optional. Name of the user's local source cluster to be peered with the destination cluster.", + "type": "string" + }, + "peerSvmName": { + "description": "Optional. Name of the user's local source vserver svm to be peered with the destination vserver svm.", + "type": "string" + }, + "peerVolumeName": { + "description": "Optional. Name of the user's local source volume to be peered with the destination volume.", + "type": "string" + }, "subnetIp": { "description": "Optional. IP address of the subnet.", "type": "string" @@ -2912,6 +3091,31 @@ }, "type": "object" }, + "ListQuotaRulesResponse": { + "description": "ListQuotaRulesResponse is the response to a ListQuotaRulesRequest.", + "id": "ListQuotaRulesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "quotaRules": { + "description": "List of quota rules", + "items": { + "$ref": "QuotaRule" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListReplicationsResponse": { "description": "ListReplicationsResponse is the result of ListReplicationsRequest.", "id": "ListReplicationsResponse", @@ -3220,6 +3424,87 @@ }, "type": "object" }, + "QuotaRule": { + "description": "QuotaRule specifies the maximum disk space a user or group can use within a volume. They can be used for creating default and individual quota rules.", + "id": "QuotaRule", + "properties": { + "createTime": { + "description": "Output only. Create time of the quota rule", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the quota rule", + "type": "string" + }, + "diskLimitMib": { + "description": "Required. The maximum allowed disk space in MiB.", + "format": "int32", + "type": "integer" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels of the quota rule", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the quota rule. Format: `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the quota rule", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "UPDATING", + "DELETING", + "READY", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified state for quota rule", + "Quota rule is creating", + "Quota rule is updating", + "Quota rule is deleting", + "Quota rule is ready", + "Quota rule is in error state." + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the quota rule", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Optional. The quota rule applies to the specified user or group, identified by a Unix UID/GID, Windows SID, or null for default.", + "type": "string" + }, + "type": { + "description": "Required. The type of quota rule.", + "enum": [ + "TYPE_UNSPECIFIED", + "INDIVIDUAL_USER_QUOTA", + "INDIVIDUAL_GROUP_QUOTA", + "DEFAULT_USER_QUOTA", + "DEFAULT_GROUP_QUOTA" + ], + "enumDescriptions": [ + "Unspecified type for quota rule", + "Individual user quota rule", + "Individual group quota rule", + "Default user quota rule", + "Default group quota rule" + ], + "type": "string" + } + }, + "type": "object" + }, "Replication": { "description": "Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.", "id": "Replication", diff --git a/netapp/v1/netapp-gen.go b/netapp/v1/netapp-gen.go index 9f25a0f9291..bf20403e580 100644 --- a/netapp/v1/netapp-gen.go +++ b/netapp/v1/netapp-gen.go @@ -267,6 +267,7 @@ type ProjectsLocationsStoragePoolsService struct { func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesService { rs := &ProjectsLocationsVolumesService{s: s} + rs.QuotaRules = NewProjectsLocationsVolumesQuotaRulesService(s) rs.Replications = NewProjectsLocationsVolumesReplicationsService(s) rs.Snapshots = NewProjectsLocationsVolumesSnapshotsService(s) return rs @@ -275,11 +276,22 @@ func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesSer type ProjectsLocationsVolumesService struct { s *Service + QuotaRules *ProjectsLocationsVolumesQuotaRulesService + Replications *ProjectsLocationsVolumesReplicationsService Snapshots *ProjectsLocationsVolumesSnapshotsService } +func NewProjectsLocationsVolumesQuotaRulesService(s *Service) *ProjectsLocationsVolumesQuotaRulesService { + rs := &ProjectsLocationsVolumesQuotaRulesService{s: s} + return rs +} + +type ProjectsLocationsVolumesQuotaRulesService struct { + s *Service +} + func NewProjectsLocationsVolumesReplicationsService(s *Service) *ProjectsLocationsVolumesReplicationsService { rs := &ProjectsLocationsVolumesReplicationsService{s: s} return rs @@ -808,6 +820,15 @@ type HybridPeeringDetails struct { // Passphrase: Optional. Temporary passphrase generated to accept cluster // peering command. Passphrase string `json:"passphrase,omitempty"` + // PeerClusterName: Optional. Name of the user's local source cluster to be + // peered with the destination cluster. + PeerClusterName string `json:"peerClusterName,omitempty"` + // PeerSvmName: Optional. Name of the user's local source vserver svm to be + // peered with the destination vserver svm. + PeerSvmName string `json:"peerSvmName,omitempty"` + // PeerVolumeName: Optional. Name of the user's local source volume to be + // peered with the destination volume. + PeerVolumeName string `json:"peerVolumeName,omitempty"` // SubnetIp: Optional. IP address of the subnet. SubnetIp string `json:"subnetIp,omitempty"` // ForceSendFields is a list of field names (e.g. "Command") to unconditionally @@ -1146,6 +1167,37 @@ func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListQuotaRulesResponse: ListQuotaRulesResponse is the response to a +// ListQuotaRulesRequest. +type ListQuotaRulesResponse struct { + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // QuotaRules: List of quota rules + QuotaRules []*QuotaRule `json:"quotaRules,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListQuotaRulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListQuotaRulesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListReplicationsResponse: ListReplicationsResponse is the result of // ListReplicationsRequest. type ListReplicationsResponse struct { @@ -1508,6 +1560,67 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// QuotaRule: QuotaRule specifies the maximum disk space a user or group can +// use within a volume. They can be used for creating default and individual +// quota rules. +type QuotaRule struct { + // CreateTime: Output only. Create time of the quota rule + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. Description of the quota rule + Description string `json:"description,omitempty"` + // DiskLimitMib: Required. The maximum allowed disk space in MiB. + DiskLimitMib int64 `json:"diskLimitMib,omitempty"` + // Labels: Optional. Labels of the quota rule + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the quota rule. Format: + // `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id + // }/quotaRules/{quota_rule_id}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the quota rule + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state for quota rule + // "CREATING" - Quota rule is creating + // "UPDATING" - Quota rule is updating + // "DELETING" - Quota rule is deleting + // "READY" - Quota rule is ready + // "ERROR" - Quota rule is in error state. + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the quota rule + StateDetails string `json:"stateDetails,omitempty"` + // Target: Optional. The quota rule applies to the specified user or group, + // identified by a Unix UID/GID, Windows SID, or null for default. + Target string `json:"target,omitempty"` + // Type: Required. The type of quota rule. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type for quota rule + // "INDIVIDUAL_USER_QUOTA" - Individual user quota rule + // "INDIVIDUAL_GROUP_QUOTA" - Individual group quota rule + // "DEFAULT_USER_QUOTA" - Default user quota rule + // "DEFAULT_GROUP_QUOTA" - Default group quota rule + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s QuotaRule) MarshalJSON() ([]byte, error) { + type NoMethod QuotaRule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Replication: Replication is a nested resource under Volume, that describes a // cross-region replication relationship between 2 volumes in different // regions. @@ -7836,6 +7949,600 @@ func (c *ProjectsLocationsVolumesRevertCall) Do(opts ...googleapi.CallOption) (* return ret, nil } +type ProjectsLocationsVolumesQuotaRulesCreateCall struct { + s *Service + parent string + quotarule *QuotaRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new quota rule. +// +// - parent: Parent value for CreateQuotaRuleRequest. +func (r *ProjectsLocationsVolumesQuotaRulesService) Create(parent string, quotarule *QuotaRule) *ProjectsLocationsVolumesQuotaRulesCreateCall { + c := &ProjectsLocationsVolumesQuotaRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.quotarule = quotarule + return c +} + +// QuotaRuleId sets the optional parameter "quotaRuleId": Required. ID of the +// quota rule to create. Must be unique within the parent resource. Must +// contain only letters, numbers, underscore and hyphen, with the first +// character a letter or underscore, the last a letter or underscore or a +// number, and a 63 character maximum. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) QuotaRuleId(quotaRuleId string) *ProjectsLocationsVolumesQuotaRulesCreateCall { + c.urlParams_.Set("quotaRuleId", quotaRuleId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.quotarule) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/quotaRules") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsVolumesQuotaRulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a quota rule. +// +// - name: Name of the quota rule. +func (r *ProjectsLocationsVolumesQuotaRulesService) Delete(name string) *ProjectsLocationsVolumesQuotaRulesDeleteCall { + c := &ProjectsLocationsVolumesQuotaRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsVolumesQuotaRulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns details of the specified quota rule. +// +// - name: Name of the quota rule. +func (r *ProjectsLocationsVolumesQuotaRulesService) Get(name string) *ProjectsLocationsVolumesQuotaRulesGetCall { + c := &ProjectsLocationsVolumesQuotaRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesQuotaRulesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *QuotaRule.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Do(opts ...googleapi.CallOption) (*QuotaRule, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &QuotaRule{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsVolumesQuotaRulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns list of all quota rules in a location. +// +// - parent: Parent value for ListQuotaRulesRequest. +func (r *ProjectsLocationsVolumesQuotaRulesService) List(parent string) *ProjectsLocationsVolumesQuotaRulesListCall { + c := &ProjectsLocationsVolumesQuotaRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Filter(filter string) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsVolumesQuotaRulesListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, the server will pick +// an appropriate default. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) PageToken(pageToken string) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesQuotaRulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/quotaRules") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListQuotaRulesResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Do(opts ...googleapi.CallOption) (*ListQuotaRulesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListQuotaRulesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Pages(ctx context.Context, f func(*ListQuotaRulesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsVolumesQuotaRulesPatchCall struct { + s *Service + name string + quotarule *QuotaRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a quota rule. +// +// - name: Identifier. The resource name of the quota rule. Format: +// `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_ +// id}/quotaRules/{quota_rule_id}`. +func (r *ProjectsLocationsVolumesQuotaRulesService) Patch(name string, quotarule *QuotaRule) *ProjectsLocationsVolumesQuotaRulesPatchCall { + c := &ProjectsLocationsVolumesQuotaRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.quotarule = quotarule + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the Quota Rule resource by the +// update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then all fields will be +// overwritten. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesQuotaRulesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.quotarule) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsVolumesReplicationsCreateCall struct { s *Service parent string diff --git a/netapp/v1beta1/netapp-api.json b/netapp/v1beta1/netapp-api.json index d4013ffdc17..b449582a3e5 100644 --- a/netapp/v1beta1/netapp-api.json +++ b/netapp/v1beta1/netapp-api.json @@ -1616,6 +1616,173 @@ } }, "resources": { + "quotaRules": { + "methods": { + "create": { + "description": "Creates a new quota rule.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules", + "httpMethod": "POST", + "id": "netapp.projects.locations.volumes.quotaRules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent value for CreateQuotaRuleRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + }, + "quotaRuleId": { + "description": "Required. ID of the quota rule to create. Must be unique within the parent resource. Must contain only letters, numbers, underscore and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/quotaRules", + "request": { + "$ref": "QuotaRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a quota rule.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", + "httpMethod": "DELETE", + "id": "netapp.projects.locations.volumes.quotaRules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the quota rule.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns details of the specified quota rule.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.quotaRules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the quota rule", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "QuotaRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns list of all quota rules in a location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules", + "httpMethod": "GET", + "id": "netapp.projects.locations.volumes.quotaRules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListQuotaRulesRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/quotaRules", + "response": { + "$ref": "ListQuotaRulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a quota rule.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", + "httpMethod": "PATCH", + "id": "netapp.projects.locations.volumes.quotaRules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the quota rule. Format: `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the Quota Rule resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "QuotaRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "replications": { "methods": { "create": { @@ -2097,7 +2264,7 @@ } } }, - "revision": "20250116", + "revision": "20250123", "rootUrl": "https://netapp.googleapis.com/", "schemas": { "ActiveDirectory": { @@ -2619,6 +2786,18 @@ "description": "Optional. Temporary passphrase generated to accept cluster peering command.", "type": "string" }, + "peerClusterName": { + "description": "Optional. Name of the user's local source cluster to be peered with the destination cluster.", + "type": "string" + }, + "peerSvmName": { + "description": "Optional. Name of the user's local source vserver svm to be peered with the destination vserver svm.", + "type": "string" + }, + "peerVolumeName": { + "description": "Optional. Name of the user's local source volume to be peered with the destination volume.", + "type": "string" + }, "subnetIp": { "description": "Optional. IP address of the subnet.", "type": "string" @@ -2912,6 +3091,31 @@ }, "type": "object" }, + "ListQuotaRulesResponse": { + "description": "ListQuotaRulesResponse is the response to a ListQuotaRulesRequest.", + "id": "ListQuotaRulesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "quotaRules": { + "description": "List of quota rules", + "items": { + "$ref": "QuotaRule" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListReplicationsResponse": { "description": "ListReplicationsResponse is the result of ListReplicationsRequest.", "id": "ListReplicationsResponse", @@ -3220,6 +3424,87 @@ }, "type": "object" }, + "QuotaRule": { + "description": "QuotaRule specifies the maximum disk space a user or group can use within a volume. They can be used for creating default and individual quota rules.", + "id": "QuotaRule", + "properties": { + "createTime": { + "description": "Output only. Create time of the quota rule", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the quota rule", + "type": "string" + }, + "diskLimitMib": { + "description": "Required. The maximum allowed disk space in MiB.", + "format": "int32", + "type": "integer" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels of the quota rule", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the quota rule. Format: `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id}/quotaRules/{quota_rule_id}`.", + "type": "string" + }, + "state": { + "description": "Output only. State of the quota rule", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "UPDATING", + "DELETING", + "READY", + "ERROR" + ], + "enumDescriptions": [ + "Unspecified state for quota rule", + "Quota rule is creating", + "Quota rule is updating", + "Quota rule is deleting", + "Quota rule is ready", + "Quota rule is in error state." + ], + "readOnly": true, + "type": "string" + }, + "stateDetails": { + "description": "Output only. State details of the quota rule", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Optional. The quota rule applies to the specified user or group, identified by a Unix UID/GID, Windows SID, or null for default.", + "type": "string" + }, + "type": { + "description": "Required. The type of quota rule.", + "enum": [ + "TYPE_UNSPECIFIED", + "INDIVIDUAL_USER_QUOTA", + "INDIVIDUAL_GROUP_QUOTA", + "DEFAULT_USER_QUOTA", + "DEFAULT_GROUP_QUOTA" + ], + "enumDescriptions": [ + "Unspecified type for quota rule", + "Individual user quota rule", + "Individual group quota rule", + "Default user quota rule", + "Default group quota rule" + ], + "type": "string" + } + }, + "type": "object" + }, "Replication": { "description": "Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.", "id": "Replication", diff --git a/netapp/v1beta1/netapp-gen.go b/netapp/v1beta1/netapp-gen.go index 8417fb9f9a5..1ba2dfa08e1 100644 --- a/netapp/v1beta1/netapp-gen.go +++ b/netapp/v1beta1/netapp-gen.go @@ -267,6 +267,7 @@ type ProjectsLocationsStoragePoolsService struct { func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesService { rs := &ProjectsLocationsVolumesService{s: s} + rs.QuotaRules = NewProjectsLocationsVolumesQuotaRulesService(s) rs.Replications = NewProjectsLocationsVolumesReplicationsService(s) rs.Snapshots = NewProjectsLocationsVolumesSnapshotsService(s) return rs @@ -275,11 +276,22 @@ func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesSer type ProjectsLocationsVolumesService struct { s *Service + QuotaRules *ProjectsLocationsVolumesQuotaRulesService + Replications *ProjectsLocationsVolumesReplicationsService Snapshots *ProjectsLocationsVolumesSnapshotsService } +func NewProjectsLocationsVolumesQuotaRulesService(s *Service) *ProjectsLocationsVolumesQuotaRulesService { + rs := &ProjectsLocationsVolumesQuotaRulesService{s: s} + return rs +} + +type ProjectsLocationsVolumesQuotaRulesService struct { + s *Service +} + func NewProjectsLocationsVolumesReplicationsService(s *Service) *ProjectsLocationsVolumesReplicationsService { rs := &ProjectsLocationsVolumesReplicationsService{s: s} return rs @@ -808,6 +820,15 @@ type HybridPeeringDetails struct { // Passphrase: Optional. Temporary passphrase generated to accept cluster // peering command. Passphrase string `json:"passphrase,omitempty"` + // PeerClusterName: Optional. Name of the user's local source cluster to be + // peered with the destination cluster. + PeerClusterName string `json:"peerClusterName,omitempty"` + // PeerSvmName: Optional. Name of the user's local source vserver svm to be + // peered with the destination vserver svm. + PeerSvmName string `json:"peerSvmName,omitempty"` + // PeerVolumeName: Optional. Name of the user's local source volume to be + // peered with the destination volume. + PeerVolumeName string `json:"peerVolumeName,omitempty"` // SubnetIp: Optional. IP address of the subnet. SubnetIp string `json:"subnetIp,omitempty"` // ForceSendFields is a list of field names (e.g. "Command") to unconditionally @@ -1146,6 +1167,37 @@ func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListQuotaRulesResponse: ListQuotaRulesResponse is the response to a +// ListQuotaRulesRequest. +type ListQuotaRulesResponse struct { + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // QuotaRules: List of quota rules + QuotaRules []*QuotaRule `json:"quotaRules,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListQuotaRulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListQuotaRulesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListReplicationsResponse: ListReplicationsResponse is the result of // ListReplicationsRequest. type ListReplicationsResponse struct { @@ -1508,6 +1560,67 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// QuotaRule: QuotaRule specifies the maximum disk space a user or group can +// use within a volume. They can be used for creating default and individual +// quota rules. +type QuotaRule struct { + // CreateTime: Output only. Create time of the quota rule + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. Description of the quota rule + Description string `json:"description,omitempty"` + // DiskLimitMib: Required. The maximum allowed disk space in MiB. + DiskLimitMib int64 `json:"diskLimitMib,omitempty"` + // Labels: Optional. Labels of the quota rule + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the quota rule. Format: + // `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_id + // }/quotaRules/{quota_rule_id}`. + Name string `json:"name,omitempty"` + // State: Output only. State of the quota rule + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state for quota rule + // "CREATING" - Quota rule is creating + // "UPDATING" - Quota rule is updating + // "DELETING" - Quota rule is deleting + // "READY" - Quota rule is ready + // "ERROR" - Quota rule is in error state. + State string `json:"state,omitempty"` + // StateDetails: Output only. State details of the quota rule + StateDetails string `json:"stateDetails,omitempty"` + // Target: Optional. The quota rule applies to the specified user or group, + // identified by a Unix UID/GID, Windows SID, or null for default. + Target string `json:"target,omitempty"` + // Type: Required. The type of quota rule. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified type for quota rule + // "INDIVIDUAL_USER_QUOTA" - Individual user quota rule + // "INDIVIDUAL_GROUP_QUOTA" - Individual group quota rule + // "DEFAULT_USER_QUOTA" - Default user quota rule + // "DEFAULT_GROUP_QUOTA" - Default group quota rule + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s QuotaRule) MarshalJSON() ([]byte, error) { + type NoMethod QuotaRule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Replication: Replication is a nested resource under Volume, that describes a // cross-region replication relationship between 2 volumes in different // regions. @@ -7836,6 +7949,600 @@ func (c *ProjectsLocationsVolumesRevertCall) Do(opts ...googleapi.CallOption) (* return ret, nil } +type ProjectsLocationsVolumesQuotaRulesCreateCall struct { + s *Service + parent string + quotarule *QuotaRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new quota rule. +// +// - parent: Parent value for CreateQuotaRuleRequest. +func (r *ProjectsLocationsVolumesQuotaRulesService) Create(parent string, quotarule *QuotaRule) *ProjectsLocationsVolumesQuotaRulesCreateCall { + c := &ProjectsLocationsVolumesQuotaRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.quotarule = quotarule + return c +} + +// QuotaRuleId sets the optional parameter "quotaRuleId": Required. ID of the +// quota rule to create. Must be unique within the parent resource. Must +// contain only letters, numbers, underscore and hyphen, with the first +// character a letter or underscore, the last a letter or underscore or a +// number, and a 63 character maximum. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) QuotaRuleId(quotaRuleId string) *ProjectsLocationsVolumesQuotaRulesCreateCall { + c.urlParams_.Set("quotaRuleId", quotaRuleId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.quotarule) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/quotaRules") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsVolumesQuotaRulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a quota rule. +// +// - name: Name of the quota rule. +func (r *ProjectsLocationsVolumesQuotaRulesService) Delete(name string) *ProjectsLocationsVolumesQuotaRulesDeleteCall { + c := &ProjectsLocationsVolumesQuotaRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsVolumesQuotaRulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns details of the specified quota rule. +// +// - name: Name of the quota rule. +func (r *ProjectsLocationsVolumesQuotaRulesService) Get(name string) *ProjectsLocationsVolumesQuotaRulesGetCall { + c := &ProjectsLocationsVolumesQuotaRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesQuotaRulesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *QuotaRule.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Do(opts ...googleapi.CallOption) (*QuotaRule, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &QuotaRule{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsVolumesQuotaRulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns list of all quota rules in a location. +// +// - parent: Parent value for ListQuotaRulesRequest. +func (r *ProjectsLocationsVolumesQuotaRulesService) List(parent string) *ProjectsLocationsVolumesQuotaRulesListCall { + c := &ProjectsLocationsVolumesQuotaRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Filter(filter string) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsVolumesQuotaRulesListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, the server will pick +// an appropriate default. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) PageToken(pageToken string) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesQuotaRulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/quotaRules") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListQuotaRulesResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Do(opts ...googleapi.CallOption) (*ListQuotaRulesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListQuotaRulesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.list", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsVolumesQuotaRulesListCall) Pages(ctx context.Context, f func(*ListQuotaRulesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsVolumesQuotaRulesPatchCall struct { + s *Service + name string + quotarule *QuotaRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a quota rule. +// +// - name: Identifier. The resource name of the quota rule. Format: +// `projects/{project_number}/locations/{location_id}/volumes/volumes/{volume_ +// id}/quotaRules/{quota_rule_id}`. +func (r *ProjectsLocationsVolumesQuotaRulesService) Patch(name string, quotarule *QuotaRule) *ProjectsLocationsVolumesQuotaRulesPatchCall { + c := &ProjectsLocationsVolumesQuotaRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.quotarule = quotarule + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the Quota Rule resource by the +// update. The fields specified in the update_mask are relative to the +// resource, not the full request. A field will be overwritten if it is in the +// mask. If the user does not provide a mask then all fields will be +// overwritten. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesQuotaRulesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.quotarule) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "netapp.projects.locations.volumes.quotaRules.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + b, err := gensupport.DecodeResponseBytes(target, res) + if err != nil { + return nil, err + } + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "netapp.projects.locations.volumes.quotaRules.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsVolumesReplicationsCreateCall struct { s *Service parent string diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index afd2980e474..86b8e9939ba 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -1067,7 +1067,7 @@ } } }, - "revision": "20250115", + "revision": "20250121", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1319,6 +1319,12 @@ "readOnly": true, "type": "string" }, + "createTime": { + "description": "Output only. The time when the backup collection was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "kmsKey": { "description": "Output only. The KMS key used to encrypt the backups under this backup collection.", "readOnly": true, @@ -3768,7 +3774,8 @@ "NETWORK_CONNECTIONS", "STORAGE_UTILIZATION", "STORAGE_USED_BYTES", - "NODE_COUNT" + "NODE_COUNT", + "MEMORY_USED_BYTES" ], "enumDescriptions": [ "Unspecified metric type.", @@ -3777,7 +3784,8 @@ "Number of network connections for a resource.", "Storage utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", "Sotrage used by a resource.", - "Node count for a resource. It represents the number of nodes units in a bigtable/spanner instance." + "Node count for a resource. It represents the number of nodes units in a bigtable/spanner instance.", + "Memory used by a resource (in bytes)." ], "type": "string" }, diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index 2d95b559ee3..8e7d46376ba 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -461,6 +461,8 @@ type BackupCollection struct { Cluster string `json:"cluster,omitempty"` // ClusterUid: Output only. The cluster uid of the backup collection. ClusterUid string `json:"clusterUid,omitempty"` + // CreateTime: Output only. The time when the backup collection was created. + CreateTime string `json:"createTime,omitempty"` // KmsKey: Output only. The KMS key used to encrypt the backups under this // backup collection. KmsKey string `json:"kmsKey,omitempty"` @@ -2992,6 +2994,7 @@ type ObservabilityMetricData struct { // "STORAGE_USED_BYTES" - Sotrage used by a resource. // "NODE_COUNT" - Node count for a resource. It represents the number of // nodes units in a bigtable/spanner instance. + // "MEMORY_USED_BYTES" - Memory used by a resource (in bytes). MetricType string `json:"metricType,omitempty"` // ObservationTime: Required. The time the metric value was observed. ObservationTime string `json:"observationTime,omitempty"`