diff --git a/cloudkms/v1/cloudkms-api.json b/cloudkms/v1/cloudkms-api.json index 65aff0443ca..a683158d1fe 100644 --- a/cloudkms/v1/cloudkms-api.json +++ b/cloudkms/v1/cloudkms-api.json @@ -1615,6 +1615,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", "required": true, "type": "string" + }, + "publicKeyFormat": { + "description": "Optional. The PublicKey format specified by the user. This field is required for PQC algorithms. If specified, the public key will be exported through the public_key field in the requested format. Otherwise, the pem field will be populated for non-PQC algorithms, and an error will be returned for PQC algorithms.", + "enum": [ + "PUBLIC_KEY_FORMAT_UNSPECIFIED", + "PEM", + "NIST_PQC" + ], + "enumDescriptions": [ + "If the public_key_format field is not specified: - For PQC algorithms, an error will be returned. - For non-PQC algorithms, the default format is PEM, and the field pem will be populated. Otherwise, the public key will be exported through the public_key field in the requested format.", + "The returned public key will be encoded in PEM format. See the [RFC7468](https://tools.ietf.org/html/rfc7468) sections for [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual Encoding of Subject Public Key Info] (https://tools.ietf.org/html/rfc7468#section-13) for more information.", + "This is supported only for PQC algorithms. The key material is returned in the format defined by NIST PQC standards (FIPS 203, FIPS 204, and FIPS 205)." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}/publicKey", @@ -2137,7 +2152,7 @@ } } }, - "revision": "20250102", + "revision": "20250205", "rootUrl": "https://cloudkms.googleapis.com/", "schemas": { "AsymmetricDecryptRequest": { @@ -2456,6 +2471,23 @@ }, "type": "object" }, + "ChecksummedData": { + "description": "Data with integrity verification field.", + "id": "ChecksummedData", + "properties": { + "crc32cChecksum": { + "description": "Integrity verification field. A CRC32C checksum of the returned ChecksummedData.data. An integrity check of ChecksummedData.data can be performed by computing the CRC32C checksum of ChecksummedData.data and comparing your results to this field. Discard the response in case of non-matching checksum values, and perform a limited number of retries. A persistent mismatch may indicate an issue in your computation of the CRC32C checksum. Note: This field is defined as int64 for reasons of compatibility across different languages. However, it is a non-negative integer, which will never exceed 2^32-1, and can be safely downconverted to uint32 in languages that support this type.", + "format": "int64", + "type": "string" + }, + "data": { + "description": "Raw Data.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, "CryptoKey": { "description": "A CryptoKey represents a logical key that can be used for cryptographic operations. A CryptoKey is made up of zero or more versions, which represent the actual key material used in cryptographic operations.", "id": "CryptoKey", @@ -2579,7 +2611,9 @@ "HMAC_SHA384", "HMAC_SHA512", "HMAC_SHA224", - "EXTERNAL_SYMMETRIC_ENCRYPTION" + "EXTERNAL_SYMMETRIC_ENCRYPTION", + "PQ_SIGN_ML_DSA_65", + "PQ_SIGN_SLH_DSA_SHA2_128S" ], "enumDescriptions": [ "Not specified.", @@ -2617,7 +2651,9 @@ "HMAC-SHA384 signing with a 384 bit key.", "HMAC-SHA512 signing with a 512 bit key.", "HMAC-SHA224 signing with a 224 bit key.", - "Algorithm representing symmetric encryption by an external key manager." + "Algorithm representing symmetric encryption by an external key manager.", + "The post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 3. Randomized version.", + "The post-quantum stateless hash-based digital signature algorithm, at security level 1. Randomized version." ], "readOnly": true, "type": "string" @@ -2785,7 +2821,9 @@ "HMAC_SHA384", "HMAC_SHA512", "HMAC_SHA224", - "EXTERNAL_SYMMETRIC_ENCRYPTION" + "EXTERNAL_SYMMETRIC_ENCRYPTION", + "PQ_SIGN_ML_DSA_65", + "PQ_SIGN_SLH_DSA_SHA2_128S" ], "enumDescriptions": [ "Not specified.", @@ -2823,7 +2861,9 @@ "HMAC-SHA384 signing with a 384 bit key.", "HMAC-SHA512 signing with a 512 bit key.", "HMAC-SHA224 signing with a 224 bit key.", - "Algorithm representing symmetric encryption by an external key manager." + "Algorithm representing symmetric encryption by an external key manager.", + "The post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 3. Randomized version.", + "The post-quantum stateless hash-based digital signature algorithm, at security level 1. Randomized version." ], "type": "string" }, @@ -3206,7 +3246,9 @@ "HMAC_SHA384", "HMAC_SHA512", "HMAC_SHA224", - "EXTERNAL_SYMMETRIC_ENCRYPTION" + "EXTERNAL_SYMMETRIC_ENCRYPTION", + "PQ_SIGN_ML_DSA_65", + "PQ_SIGN_SLH_DSA_SHA2_128S" ], "enumDescriptions": [ "Not specified.", @@ -3244,7 +3286,9 @@ "HMAC-SHA384 signing with a 384 bit key.", "HMAC-SHA512 signing with a 512 bit key.", "HMAC-SHA224 signing with a 224 bit key.", - "Algorithm representing symmetric encryption by an external key manager." + "Algorithm representing symmetric encryption by an external key manager.", + "The post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 3. Randomized version.", + "The post-quantum stateless hash-based digital signature algorithm, at security level 1. Randomized version." ], "type": "string" }, @@ -3925,7 +3969,9 @@ "HMAC_SHA384", "HMAC_SHA512", "HMAC_SHA224", - "EXTERNAL_SYMMETRIC_ENCRYPTION" + "EXTERNAL_SYMMETRIC_ENCRYPTION", + "PQ_SIGN_ML_DSA_65", + "PQ_SIGN_SLH_DSA_SHA2_128S" ], "enumDescriptions": [ "Not specified.", @@ -3963,7 +4009,9 @@ "HMAC-SHA384 signing with a 384 bit key.", "HMAC-SHA512 signing with a 512 bit key.", "HMAC-SHA224 signing with a 224 bit key.", - "Algorithm representing symmetric encryption by an external key manager." + "Algorithm representing symmetric encryption by an external key manager.", + "The post-quantum Module-Lattice-Based Digital Signature Algorithm, at security level 3. Randomized version.", + "The post-quantum stateless hash-based digital signature algorithm, at security level 1. Randomized version." ], "type": "string" }, @@ -3997,6 +4045,24 @@ "Crypto operations are performed in an EKM-over-VPC backend." ], "type": "string" + }, + "publicKey": { + "$ref": "ChecksummedData", + "description": "This field contains the public key (with integrity verification), formatted according to the public_key_format field." + }, + "publicKeyFormat": { + "description": "The PublicKey format specified by the customer through the public_key_format field.", + "enum": [ + "PUBLIC_KEY_FORMAT_UNSPECIFIED", + "PEM", + "NIST_PQC" + ], + "enumDescriptions": [ + "If the public_key_format field is not specified: - For PQC algorithms, an error will be returned. - For non-PQC algorithms, the default format is PEM, and the field pem will be populated. Otherwise, the public key will be exported through the public_key field in the requested format.", + "The returned public key will be encoded in PEM format. See the [RFC7468](https://tools.ietf.org/html/rfc7468) sections for [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual Encoding of Subject Public Key Info] (https://tools.ietf.org/html/rfc7468#section-13) for more information.", + "This is supported only for PQC algorithms. The key material is returned in the format defined by NIST PQC standards (FIPS 203, FIPS 204, and FIPS 205)." + ], + "type": "string" } }, "type": "object" diff --git a/cloudkms/v1/cloudkms-gen.go b/cloudkms/v1/cloudkms-gen.go index b3743734265..a6a5aff25f3 100644 --- a/cloudkms/v1/cloudkms-gen.go +++ b/cloudkms/v1/cloudkms-gen.go @@ -812,6 +812,39 @@ func (s CertificateChains) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ChecksummedData: Data with integrity verification field. +type ChecksummedData struct { + // Crc32cChecksum: Integrity verification field. A CRC32C checksum of the + // returned ChecksummedData.data. An integrity check of ChecksummedData.data + // can be performed by computing the CRC32C checksum of ChecksummedData.data + // and comparing your results to this field. Discard the response in case of + // non-matching checksum values, and perform a limited number of retries. A + // persistent mismatch may indicate an issue in your computation of the CRC32C + // checksum. Note: This field is defined as int64 for reasons of compatibility + // across different languages. However, it is a non-negative integer, which + // will never exceed 2^32-1, and can be safely downconverted to uint32 in + // languages that support this type. + Crc32cChecksum int64 `json:"crc32cChecksum,omitempty,string"` + // Data: Raw Data. + Data string `json:"data,omitempty"` + // ForceSendFields is a list of field names (e.g. "Crc32cChecksum") 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. "Crc32cChecksum") 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 ChecksummedData) MarshalJSON() ([]byte, error) { + type NoMethod ChecksummedData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CryptoKey: A CryptoKey represents a logical key that can be used for // cryptographic operations. A CryptoKey is made up of zero or more versions, // which represent the actual key material used in cryptographic operations. @@ -976,6 +1009,10 @@ type CryptoKeyVersion struct { // "HMAC_SHA224" - HMAC-SHA224 signing with a 224 bit key. // "EXTERNAL_SYMMETRIC_ENCRYPTION" - Algorithm representing symmetric // encryption by an external key manager. + // "PQ_SIGN_ML_DSA_65" - The post-quantum Module-Lattice-Based Digital + // Signature Algorithm, at security level 3. Randomized version. + // "PQ_SIGN_SLH_DSA_SHA2_128S" - The post-quantum stateless hash-based + // digital signature algorithm, at security level 1. Randomized version. Algorithm string `json:"algorithm,omitempty"` // Attestation: Output only. Statement that was generated and signed by the HSM // at key creation time. Use this statement to verify attributes of the key as @@ -1157,6 +1194,10 @@ type CryptoKeyVersionTemplate struct { // "HMAC_SHA224" - HMAC-SHA224 signing with a 224 bit key. // "EXTERNAL_SYMMETRIC_ENCRYPTION" - Algorithm representing symmetric // encryption by an external key manager. + // "PQ_SIGN_ML_DSA_65" - The post-quantum Module-Lattice-Based Digital + // Signature Algorithm, at security level 3. Randomized version. + // "PQ_SIGN_SLH_DSA_SHA2_128S" - The post-quantum stateless hash-based + // digital signature algorithm, at security level 1. Randomized version. Algorithm string `json:"algorithm,omitempty"` // ProtectionLevel: ProtectionLevel to use when creating a CryptoKeyVersion // based on this template. Immutable. Defaults to SOFTWARE. @@ -1760,6 +1801,10 @@ type ImportCryptoKeyVersionRequest struct { // "HMAC_SHA224" - HMAC-SHA224 signing with a 224 bit key. // "EXTERNAL_SYMMETRIC_ENCRYPTION" - Algorithm representing symmetric // encryption by an external key manager. + // "PQ_SIGN_ML_DSA_65" - The post-quantum Module-Lattice-Based Digital + // Signature Algorithm, at security level 3. Randomized version. + // "PQ_SIGN_SLH_DSA_SHA2_128S" - The post-quantum stateless hash-based + // digital signature algorithm, at security level 1. Randomized version. Algorithm string `json:"algorithm,omitempty"` // CryptoKeyVersion: Optional. The optional name of an existing // CryptoKeyVersion to target for an import operation. If this field is not @@ -2798,6 +2843,10 @@ type PublicKey struct { // "HMAC_SHA224" - HMAC-SHA224 signing with a 224 bit key. // "EXTERNAL_SYMMETRIC_ENCRYPTION" - Algorithm representing symmetric // encryption by an external key manager. + // "PQ_SIGN_ML_DSA_65" - The post-quantum Module-Lattice-Based Digital + // Signature Algorithm, at security level 3. Randomized version. + // "PQ_SIGN_SLH_DSA_SHA2_128S" - The post-quantum stateless hash-based + // digital signature algorithm, at security level 1. Randomized version. Algorithm string `json:"algorithm,omitempty"` // Name: The name of the CryptoKeyVersion public key. Provided here for // verification. NOTE: This field is in Beta. @@ -2829,6 +2878,27 @@ type PublicKey struct { // "EXTERNAL_VPC" - Crypto operations are performed in an EKM-over-VPC // backend. ProtectionLevel string `json:"protectionLevel,omitempty"` + // PublicKey: This field contains the public key (with integrity verification), + // formatted according to the public_key_format field. + PublicKey *ChecksummedData `json:"publicKey,omitempty"` + // PublicKeyFormat: The PublicKey format specified by the customer through the + // public_key_format field. + // + // Possible values: + // "PUBLIC_KEY_FORMAT_UNSPECIFIED" - If the public_key_format field is not + // specified: - For PQC algorithms, an error will be returned. - For non-PQC + // algorithms, the default format is PEM, and the field pem will be populated. + // Otherwise, the public key will be exported through the public_key field in + // the requested format. + // "PEM" - The returned public key will be encoded in PEM format. See the + // [RFC7468](https://tools.ietf.org/html/rfc7468) sections for [General + // Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual + // Encoding of Subject Public Key Info] + // (https://tools.ietf.org/html/rfc7468#section-13) for more information. + // "NIST_PQC" - This is supported only for PQC algorithms. The key material + // is returned in the format defined by NIST PQC standards (FIPS 203, FIPS 204, + // and FIPS 205). + PublicKeyFormat string `json:"publicKeyFormat,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -8519,6 +8589,37 @@ func (r *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsService) GetPublicK return c } +// PublicKeyFormat sets the optional parameter "publicKeyFormat": The PublicKey +// format specified by the user. This field is required for PQC algorithms. If +// specified, the public key will be exported through the public_key field in +// the requested format. Otherwise, the pem field will be populated for non-PQC +// algorithms, and an error will be returned for PQC algorithms. +// +// Possible values: +// +// "PUBLIC_KEY_FORMAT_UNSPECIFIED" - If the public_key_format field is not +// +// specified: - For PQC algorithms, an error will be returned. - For non-PQC +// algorithms, the default format is PEM, and the field pem will be populated. +// Otherwise, the public key will be exported through the public_key field in +// the requested format. +// +// "PEM" - The returned public key will be encoded in PEM format. See the +// +// [RFC7468](https://tools.ietf.org/html/rfc7468) sections for [General +// Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual +// Encoding of Subject Public Key Info] +// (https://tools.ietf.org/html/rfc7468#section-13) for more information. +// +// "NIST_PQC" - This is supported only for PQC algorithms. The key material +// +// is returned in the format defined by NIST PQC standards (FIPS 203, FIPS 204, +// and FIPS 205). +func (c *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetPublicKeyCall) PublicKeyFormat(publicKeyFormat string) *ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsGetPublicKeyCall { + c.urlParams_.Set("publicKeyFormat", publicKeyFormat) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 426e6724f1f..4a16aaa3245 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -3083,6 +3083,54 @@ "https://www.googleapis.com/auth/compute" ] }, + "bulkSetLabels": { + "description": "Sets the labels on many disks at once. To learn more about labels, read the Labeling Resources documentation.", + "flatPath": "projects/{project}/zones/{zone}/disks/bulkSetLabels", + "httpMethod": "POST", + "id": "compute.disks.bulkSetLabels", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "query", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/disks/bulkSetLabels", + "request": { + "$ref": "BulkZoneSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "createSnapshot": { "description": "Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.", "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", @@ -15382,6 +15430,43 @@ }, "interconnectAttachmentGroups": { "methods": { + "createMembers": { + "description": "Create Interconnect Attachments with redundancy by creating them in a specified interconnect attachment group.", + "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/createMembers", + "httpMethod": "POST", + "id": "compute.interconnectAttachmentGroups.createMembers", + "parameterOrder": [ + "project", + "interconnectAttachmentGroup" + ], + "parameters": { + "interconnectAttachmentGroup": { + "description": "Name of the group resource to create members for.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/createMembers", + "request": { + "$ref": "InterconnectAttachmentGroupsCreateMembersRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "delete": { "description": "Deletes the specified InterconnectAttachmentGroup in the given scope", "flatPath": "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}", @@ -16288,7 +16373,7 @@ "$ref": "InterconnectGroupsCreateMembersRequest" }, "response": { - "$ref": "InterconnectGroupsCreateMembersResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -28075,23 +28160,89 @@ } } }, - "regionInstanceGroupManagerResizeRequests": { + "regionHealthSources": { "methods": { - "cancel": { - "description": "Cancels the specified resize request. Cancelled resize request no longer waits for the resources to be provisioned. Cancel is only possible for requests that are in accepted state.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", - "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagerResizeRequests.cancel", + "aggregatedList": { + "description": "Retrieves the list of all HealthSource resources (all regional) available to the specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.", + "flatPath": "projects/{project}/aggregated/healthSources", + "httpMethod": "GET", + "id": "compute.regionHealthSources.aggregatedList", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "includeAllScopes": { + "description": "Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.", + "location": "query", + "type": "boolean" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Name of the project scoping this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + }, + "serviceProjectNumber": { + "description": "The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api.", + "format": "int64", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/aggregated/healthSources", + "response": { + "$ref": "HealthSourceAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "description": "Deletes the specified HealthSource in the given region", + "flatPath": "projects/{project}/regions/{region}/healthSources/{healthSource}", + "httpMethod": "DELETE", + "id": "compute.regionHealthSources.delete", "parameterOrder": [ "project", "region", - "instanceGroupManager", - "resizeRequest" + "healthSource" ], "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group. Name should conform to RFC1035 or be a resource ID.", + "healthSource": { + "description": "Name of the HealthSource resource to delete.", "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" }, @@ -28103,8 +28254,9 @@ "type": "string" }, "region": { - "description": "The name of the region scoping this request. Name should conform to RFC1035.", + "description": "Name of the region scoping this request.", "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" }, @@ -28112,15 +28264,94 @@ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/healthSources/{healthSource}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified HealthSource resource in the given region.", + "flatPath": "projects/{project}/regions/{region}/healthSources/{healthSource}", + "httpMethod": "GET", + "id": "compute.regionHealthSources.get", + "parameterOrder": [ + "project", + "region", + "healthSource" + ], + "parameters": { + "healthSource": { + "description": "Name of the HealthSource resource to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" }, - "resizeRequest": { - "description": "The name of the resize request to cancel. Name should conform to RFC1035 or be a resource ID.", + "project": { + "description": "Project ID for this request.", "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", + "path": "projects/{project}/regions/{region}/healthSources/{healthSource}", + "response": { + "$ref": "HealthSource" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "Create a HealthSource in the specified project in the given region using the parameters that are included in the request.", + "flatPath": "projects/{project}/regions/{region}/healthSources", + "httpMethod": "POST", + "id": "compute.regionHealthSources.insert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/healthSources", + "request": { + "$ref": "HealthSource" + }, "response": { "$ref": "Operation" }, @@ -28129,20 +28360,82 @@ "https://www.googleapis.com/auth/compute" ] }, - "delete": { - "description": "Deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "DELETE", - "id": "compute.regionInstanceGroupManagerResizeRequests.delete", + "list": { + "description": "Lists the HealthSources for a project in the given region.", + "flatPath": "projects/{project}/regions/{region}/healthSources", + "httpMethod": "GET", + "id": "compute.regionHealthSources.list", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/healthSources", + "response": { + "$ref": "HealthSourceList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Updates the specified regional HealthSource resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "flatPath": "projects/{project}/regions/{region}/healthSources/{healthSource}", + "httpMethod": "PATCH", + "id": "compute.regionHealthSources.patch", "parameterOrder": [ "project", "region", - "instanceGroupManager", - "resizeRequest" + "healthSource" ], "parameters": { - "instanceGroupManager": { - "description": "The name of the managed instance group. Name should conform to RFC1035 or be a resource ID.", + "healthSource": { + "description": "Name of the HealthSource to update. The name must be 1-63 characters long, and comply with RFC1035.", "location": "path", "required": true, "type": "string" @@ -28155,8 +28448,9 @@ "type": "string" }, "region": { - "description": "The name of the region scoping this request. Name should conform to RFC1035.", + "description": "Name of the region scoping this request.", "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "required": true, "type": "string" }, @@ -28164,28 +28458,179 @@ "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", "location": "query", "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/healthSources/{healthSource}", + "request": { + "$ref": "HealthSource" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "flatPath": "projects/{project}/regions/{region}/healthSources/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.regionHealthSources.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" }, - "resizeRequest": { - "description": "The name of the resize request to delete. Name should conform to RFC1035 or be a resource ID.", + "region": { + "description": "The name of the region for this request.", "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", "required": true, "type": "string" } }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", + "path": "projects/{project}/regions/{region}/healthSources/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, "response": { - "$ref": "Operation" + "$ref": "TestPermissionsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" ] - }, - "get": { - "description": "Returns all of the details about the specified resize request.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", - "httpMethod": "GET", - "id": "compute.regionInstanceGroupManagerResizeRequests.get", + } + } + }, + "regionInstanceGroupManagerResizeRequests": { + "methods": { + "cancel": { + "description": "Cancels the specified resize request. Cancelled resize request no longer waits for the resources to be provisioned. Cancel is only possible for requests that are in accepted state.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagerResizeRequests.cancel", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager", + "resizeRequest" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region scoping this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "resizeRequest": { + "description": "The name of the resize request to cancel. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}/cancel", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "description": "Deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", + "httpMethod": "DELETE", + "id": "compute.regionInstanceGroupManagerResizeRequests.delete", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager", + "resizeRequest" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region scoping this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "resizeRequest": { + "description": "The name of the resize request to delete. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns all of the details about the specified resize request.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", + "httpMethod": "GET", + "id": "compute.regionInstanceGroupManagerResizeRequests.get", "parameterOrder": [ "project", "region", @@ -30984,6 +31429,130 @@ } } }, + "regionMultiMigMembers": { + "methods": { + "get": { + "description": "Retrieves information about the specified multi-MIG member.", + "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers/{multiMigMember}", + "httpMethod": "GET", + "id": "compute.regionMultiMigMembers.get", + "parameterOrder": [ + "project", + "region", + "multiMig", + "multiMigMember" + ], + "parameters": { + "multiMig": { + "description": "The name of the multi-MIG. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "multiMigMember": { + "description": "The name of the multi-MIG member. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request. Region name should conform to RFC1035.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers/{multiMigMember}", + "response": { + "$ref": "MultiMigMember" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "description": "Retrieves a list of members of a specific multi-MIG.", + "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers", + "httpMethod": "GET", + "id": "compute.regionMultiMigMembers.list", + "parameterOrder": [ + "project", + "region", + "multiMig" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "multiMig": { + "description": "The name of the multi-MIG. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request. Region name should conform to RFC1035.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers", + "response": { + "$ref": "MultiMigMemberList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "regionMultiMigs": { "methods": { "delete": { @@ -47636,7 +48205,7 @@ } } }, - "revision": "20250126", + "revision": "20250211", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -48992,14 +49561,18 @@ "VM_FAMILY_CLOUD_TPU_DEVICE_CT3", "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L", "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP", + "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E", "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" + "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P", + "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" ], "enumDescriptions": [ "", "", "", "", + "", + "", "" ], "type": "string" @@ -49070,6 +49643,10 @@ "description": "[Output Only] Contains output only fields.", "id": "AllocationResourceStatus", "properties": { + "aggregateAllocation": { + "$ref": "AllocationResourceStatusAggregateAllocation", + "description": "Properties of this aggregatereservation." + }, "reservationBlockCount": { "description": "The number of reservation blocks associated with this reservation.", "format": "int32", @@ -49086,6 +49663,21 @@ }, "type": "object" }, + "AllocationResourceStatusAggregateAllocation": { + "description": "Contains Properties set for the aggregate reservation.", + "id": "AllocationResourceStatusAggregateAllocation", + "properties": { + "utilizations": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "Per service utilization breakdown. The Key is the Google Cloud managed service name.", + "type": "object" + } + }, + "type": "object" + }, "AllocationResourceStatusSpecificSKUAllocation": { "description": "Contains Properties set for the reservation.", "id": "AllocationResourceStatusSpecificSKUAllocation", @@ -51092,7 +51684,7 @@ "type": "number" }, "name": { - "description": "Name of a custom utilization signal. The name must be 1-24 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", + "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", "type": "string" } }, @@ -51797,7 +52389,7 @@ "type": "boolean" }, "name": { - "description": "Name of a custom utilization signal. The name must be 1-24 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", + "description": "Name of a custom utilization signal. The name must be 1-64 characters long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, period, underscore, lowercase letter, or digit, except the last character, which cannot be a dash, period, or underscore. For usage guidelines, see Custom Metrics balancing mode. This field can only be used for a global or regional backend service with the loadBalancingScheme set to EXTERNAL_MANAGED, INTERNAL_MANAGED INTERNAL_SELF_MANAGED.", "type": "string" } }, @@ -53125,6 +53717,36 @@ }, "type": "object" }, + "BulkSetLabelsRequest": { + "id": "BulkSetLabelsRequest", + "properties": { + "labelFingerprint": { + "description": "The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You may optionally provide an up-to-date fingerprint hash in order to update or change labels. Make a get() request to the resource to get the latest fingerprint.", + "format": "byte", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The labels to set for this resource.", + "type": "object" + } + }, + "type": "object" + }, + "BulkZoneSetLabelsRequest": { + "id": "BulkZoneSetLabelsRequest", + "properties": { + "requests": { + "items": { + "$ref": "BulkSetLabelsRequest" + }, + "type": "array" + } + }, + "type": "object" + }, "BundledLocalSsds": { "id": "BundledLocalSsds", "properties": { @@ -53144,7 +53766,7 @@ "id": "CacheInvalidationRule", "properties": { "cacheTags": { - "description": "Not implemented.", + "description": "A list of cache tags used to identify cached objects. - Cache tags are specified when the response is first cached, by setting the `Cache-Tag` response header at the origin. - Multiple cache tags in the same invalidation request are treated as Boolean `OR` - for example, `tag1 OR tag2 OR tag3`. - If other fields are also specified, these are treated as Boolean `AND` with any tags. Up to 10 tags can be specified in a single invalidation request.", "items": { "type": "string" }, @@ -55280,9 +55902,10 @@ "id": "DiskPairReplicationState", "properties": { "dataReplicationState": { - "description": "[Output Only] The status of disk creation. - ASYNC_REPLICATION_STATE_INITIALIZING: The device is doing the initial replication after starting the replication. - ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY: The primary disk is healthily replicating to the secondary device i.e. last_replication_time is within RPO. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN: The replication is lagging above the SLO limit due to some internal issue. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING: The replication is lagging, and the RPO is not being met due to some internal issue. - ASYNC_REPLICATION_STATE_REPLICATION_STUCK: The replication is completely stuck due to some internal error. - ASYNC_REPLICATION_STATE_STOPPING: The replication is under the process of being stopped. This is a transient state. - ASYNC_REPLICATION_STATE_STOPPED: The replication between the disk-pairs have stopped. ", + "description": "[Output Only] The status of disk creation. - ASYNC_REPLICATION_STATE_INITIALIZING: The device is doing the initial replication after starting the replication. - ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY: The primary disk is healthily replicating to the secondary device i.e. last_replication_time is within RPO. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN: The replication is lagging above the SLO limit due to the disk's change rate being above the supported limit. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING: The replication is lagging, and the RPO is not being met due to some internal issue. - ASYNC_REPLICATION_STATE_REPLICATION_STUCK: The replication is completely stuck due to some internal error. - ASYNC_REPLICATION_STATE_STOPPING: The replication is under the process of being stopped. This is a transient state. - ASYNC_REPLICATION_STATE_STOPPED: The replication between the disk-pairs have stopped. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_CG_HIGH_CHURN: The replication is lagging above the SLO limit for the disk in the consistency group due to disk's change rate being above the supported limit. ", "enum": [ "ASYNC_REPLICATION_STATE_INITIALIZING", + "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_CG_HIGH_CHURN", "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN", "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING", "ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY", @@ -55293,6 +55916,7 @@ ], "enumDescriptions": [ "The device is doing the initial replication after starting the replication.", + "The replication is lagging behind (last_replication_time \u003e RPO) for the disk in a consistency group because some other disk is writing the data at a rate above the supported limit.", "The replication is lagging behind (last_replication_time \u003e RPO), because the disk's change rate is above the supported limit.", "The replication is lagging, and the RPO is not being met due to some internal issue.", "The primary disk is healthily replicating to the secondary device i.e. last_replication_time is within RPO.", @@ -55396,6 +56020,20 @@ }, "description": "List of regions that can create a regional snapshot from the current region", "type": "object" + }, + "policy": { + "description": "Policy of which location is allowed to access snapshot.", + "enum": [ + "ALL_REGIONS", + "POLICY_UNSPECIFIED", + "SPECIFIC_REGIONS" + ], + "enumDescriptions": [ + "Any regions will be able to access the source location.", + "", + "Only allowlisted regions will be able to create region scoped snapshots" + ], + "type": "string" } }, "type": "object" @@ -59558,14 +60196,18 @@ "VM_FAMILY_CLOUD_TPU_DEVICE_CT3", "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L", "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP", + "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E", "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" + "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P", + "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" ], "enumDescriptions": [ "", "", "", "", + "", + "", "" ], "type": "string" @@ -61386,359 +62028,10 @@ }, "type": "object" }, - "HealthStatus": { - "id": "HealthStatus", - "properties": { - "annotations": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata defined as annotations for network endpoint.", - "type": "object" - }, - "forwardingRule": { - "description": "URL of the forwarding rule associated with the health status of the instance.", - "type": "string" - }, - "forwardingRuleIp": { - "description": "A forwarding rule IP address assigned to this instance.", - "type": "string" - }, - "healthState": { - "description": "Health state of the IPv4 address of the instance.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "instance": { - "description": "URL of the instance resource.", - "type": "string" - }, - "ipAddress": { - "description": "For target pool based Network Load Balancing, it indicates the forwarding rule's IP address assigned to this instance. For other types of load balancing, the field indicates VM internal ip.", - "type": "string" - }, - "ipv6Address": { - "type": "string" - }, - "ipv6HealthState": { - "description": "Health state of the IPv6 address of the instance.", - "enum": [ - "HEALTHY", - "UNHEALTHY" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "port": { - "description": "The named port of the instance group, not necessarily the port that is health-checked.", - "format": "int32", - "type": "integer" - }, - "weight": { - "type": "string" - }, - "weightError": { - "enum": [ - "INVALID_WEIGHT", - "MISSING_WEIGHT", - "UNAVAILABLE_WEIGHT", - "WEIGHT_NONE" - ], - "enumDescriptions": [ - "The response to a Health Check probe had the HTTP response header field X-Load-Balancing-Endpoint-Weight, but its content was invalid (i.e., not a non-negative single-precision floating-point number in decimal string representation).", - "The response to a Health Check probe did not have the HTTP response header field X-Load-Balancing-Endpoint-Weight.", - "This is the value when the accompanied health status is either TIMEOUT (i.e.,the Health Check probe was not able to get a response in time) or UNKNOWN. For the latter, it should be typically because there has not been sufficient time to parse and report the weight for a new backend (which is with 0.0.0.0 ip address). However, it can be also due to an outage case for which the health status is explicitly reset to UNKNOWN.", - "This is the default value when WeightReportMode is DISABLE, and is also the initial value when WeightReportMode has just updated to ENABLE or DRY_RUN and there has not been sufficient time to parse and report the backend weight." - ], - "type": "string" - } - }, - "type": "object" - }, - "HealthStatusForNetworkEndpoint": { - "id": "HealthStatusForNetworkEndpoint", - "properties": { - "backendService": { - "$ref": "BackendServiceReference", - "description": "URL of the backend service associated with the health state of the network endpoint." - }, - "forwardingRule": { - "$ref": "ForwardingRuleReference", - "description": "URL of the forwarding rule associated with the health state of the network endpoint." - }, - "healthCheck": { - "$ref": "HealthCheckReference", - "description": "URL of the health check associated with the health state of the network endpoint." - }, - "healthCheckService": { - "$ref": "HealthCheckServiceReference", - "description": "URL of the health check service associated with the health state of the network endpoint." - }, - "healthState": { - "description": "Health state of the network endpoint determined based on the health checks configured.", - "enum": [ - "DRAINING", - "HEALTHY", - "UNHEALTHY", - "UNKNOWN" - ], - "enumDescriptions": [ - "Endpoint is being drained.", - "Endpoint is healthy.", - "Endpoint is unhealthy.", - "Health status of the endpoint is unknown." - ], - "type": "string" - }, - "ipv6HealthState": { - "description": "Health state of the ipv6 network endpoint determined based on the health checks configured.", - "enum": [ - "DRAINING", - "HEALTHY", - "UNHEALTHY", - "UNKNOWN" - ], - "enumDescriptions": [ - "Endpoint is being drained.", - "Endpoint is healthy.", - "Endpoint is unhealthy.", - "Health status of the endpoint is unknown." - ], - "type": "string" - } - }, - "type": "object" - }, - "Help": { - "description": "Provides links to documentation or for performing an out of band action. For example, if a quota check failed with an error indicating the calling project hasn't enabled the accessed service, this can contain a URL pointing directly to the right place in the developer console to flip the bit.", - "id": "Help", - "properties": { - "links": { - "description": "URL(s) pointing to additional information on handling the current error.", - "items": { - "$ref": "HelpLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "HelpLink": { - "description": "Describes a URL link.", - "id": "HelpLink", - "properties": { - "description": { - "description": "Describes what the link offers.", - "type": "string" - }, - "url": { - "description": "The URL of the link.", - "type": "string" - } - }, - "type": "object" - }, - "HostRule": { - "description": "UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.", - "id": "HostRule", - "properties": { - "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", - "type": "string" - }, - "hosts": { - "description": "The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", - "items": { - "type": "string" - }, - "type": "array" - }, - "pathMatcher": { - "description": "The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.", - "type": "string" - } - }, - "type": "object" - }, - "HttpFaultAbort": { - "description": "Specification for how requests are aborted as part of fault injection.", - "id": "HttpFaultAbort", - "properties": { - "httpStatus": { - "description": "The HTTP status code used to abort the request. The value must be from 200 to 599 inclusive. For gRPC protocol, the gRPC status code is mapped to HTTP status code according to this mapping table. HTTP status 200 is mapped to gRPC status UNKNOWN. Injecting an OK status is currently not supported by Traffic Director.", - "format": "uint32", - "type": "integer" - }, - "percentage": { - "description": "The percentage of traffic for connections, operations, or requests that is aborted as part of fault injection. The value must be from 0.0 to 100.0 inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "HttpFaultDelay": { - "description": "Specifies the delay introduced by the load balancer before forwarding the request to the backend service as part of fault injection.", - "id": "HttpFaultDelay", - "properties": { - "fixedDelay": { - "$ref": "Duration", - "description": "Specifies the value of the fixed delay interval." - }, - "percentage": { - "description": "The percentage of traffic for connections, operations, or requests for which a delay is introduced as part of fault injection. The value must be from 0.0 to 100.0 inclusive.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "HttpFaultInjection": { - "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by the load balancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the load balancer for a percentage of requests.", - "id": "HttpFaultInjection", - "properties": { - "abort": { - "$ref": "HttpFaultAbort", - "description": "The specification for how client requests are aborted as part of fault injection." - }, - "delay": { - "$ref": "HttpFaultDelay", - "description": "The specification for how client requests are delayed as part of fault injection, before being sent to a backend service." - } - }, - "type": "object" - }, - "HttpFilterConfig": { - "description": "HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.", - "id": "HttpFilterConfig", - "properties": { - "config": { - "description": "The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl", - "type": "string" - }, - "configTypeUrl": { - "description": "The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct", - "type": "string" - }, - "filterName": { - "description": "Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm", - "type": "string" - } - }, - "type": "object" - }, - "HttpHeaderAction": { - "description": "The request and response header transformations that take effect before the request is passed along to the selected backendService.", - "id": "HttpHeaderAction", - "properties": { - "requestHeadersToAdd": { - "description": "Headers to add to a matching request before forwarding the request to the backendService.", - "items": { - "$ref": "HttpHeaderOption" - }, - "type": "array" - }, - "requestHeadersToRemove": { - "description": "A list of header names for headers that need to be removed from the request before forwarding the request to the backendService.", - "items": { - "type": "string" - }, - "type": "array" - }, - "responseHeadersToAdd": { - "description": "Headers to add the response before sending the response back to the client.", - "items": { - "$ref": "HttpHeaderOption" - }, - "type": "array" - }, - "responseHeadersToRemove": { - "description": "A list of header names for headers that need to be removed from the response before sending the response back to the client.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "HttpHeaderMatch": { - "description": "matchRule criteria for request header matches.", - "id": "HttpHeaderMatch", - "properties": { - "exactMatch": { - "description": "The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", - "type": "string" - }, - "headerName": { - "description": "The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name \":authority\". For matching a request's method, use the headerName \":method\". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`.", - "type": "string" - }, - "invertMatch": { - "description": "If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false. ", - "type": "boolean" - }, - "prefixMatch": { - "description": "The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", - "type": "string" - }, - "presentMatch": { - "description": "A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", - "type": "boolean" - }, - "rangeMatch": { - "$ref": "Int64RangeMatch", - "description": "The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL." - }, - "regexMatch": { - "description": "The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.", - "type": "string" - }, - "suffixMatch": { - "description": "The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", - "type": "string" - } - }, - "type": "object" - }, - "HttpHeaderOption": { - "description": "Specification determining how headers are added to requests or responses.", - "id": "HttpHeaderOption", - "properties": { - "headerName": { - "description": "The name of the header.", - "type": "string" - }, - "headerValue": { - "description": "The value of the header to add.", - "type": "string" - }, - "replace": { - "description": "If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. ", - "type": "boolean" - } - }, - "type": "object" - }, - "HttpHealthCheck": { - "description": "Represents a legacy HTTP Health Check resource. Legacy HTTP health checks are now only required by target pool-based network load balancers. For all other load balancers, including backend service-based network load balancers, and for managed instance group auto-healing, you must use modern (non-legacy) health checks. For more information, see Health checks overview .", - "id": "HttpHealthCheck", + "HealthSource": { + "description": "Represents a health source. A health source resource specifies the source resources and the health aggregation policy applied to the source resources to determine the aggregated health status.", + "id": "HealthSource", "properties": { - "checkIntervalSec": { - "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", - "format": "int32", - "type": "integer" - }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -61747,23 +62040,23 @@ "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, - "healthyThreshold": { - "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", - "format": "int32", - "type": "integer" + "fingerprint": { + "description": "Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthSource. An up-to-date fingerprint must be provided in order to patch the HealthSource; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthSource.", + "format": "byte", + "type": "string" }, - "host": { - "description": "The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.", + "healthAggregationPolicy": { + "description": "URL to the HealthAggregationPolicy resource. Must be set. Must be regional and in the same region as the HealthSource. Can be mutated.", "type": "string" }, "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "description": "[Output Only] A unique identifier for this resource type. The server generates this identifier.", "format": "uint64", "type": "string" }, "kind": { - "default": "compute#httpHealthCheck", - "description": "[Output Only] Type of the resource. Always compute#httpHealthCheck for HTTP health checks.", + "default": "compute#healthSource", + "description": "[Output Only] Type of the resource. Always compute#healthSource for health sources.", "type": "string" }, "name": { @@ -61771,13 +62064,8 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, - "port": { - "description": "The TCP port number for the HTTP health check request. The default value is 80.", - "format": "int32", - "type": "integer" - }, - "requestPath": { - "description": "The request path of the HTTP health check request. The default value is /. This field does not support query parameters. Must comply with RFC3986.", + "region": { + "description": "[Output Only] URL of the region where the health source resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", "type": "string" }, "selfLink": { @@ -61785,39 +62073,928 @@ "type": "string" }, "selfLinkWithId": { - "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "description": "[Output Only] Server-defined URL with id for the resource.", "type": "string" }, - "timeoutSec": { - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.", - "format": "int32", - "type": "integer" + "sourceType": { + "description": "Specifies the type of the HealthSource. The only allowed value is BACKEND_SERVICE. Must be specified when the HealthSource is created, and cannot be mutated.", + "enum": [ + "BACKEND_SERVICE" + ], + "enumDescriptions": [ + "" + ], + "type": "string" }, - "unhealthyThreshold": { - "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", - "format": "int32", - "type": "integer" + "sources": { + "description": "URLs to the source resources. Must be size 1. Must be a BackendService if the sourceType is BACKEND_SERVICE. The BackendService must have load balancing scheme INTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). The BackendService may use only IGs, MIGs, or NEGs of type GCE_VM_IP or GCE_VM_IP_PORT. The BackendService may not use haPolicy. Can be mutated.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "HttpHealthCheckList": { - "description": "Contains a list of HttpHealthCheck resources.", - "id": "HttpHealthCheckList", + "HealthSourceAggregatedList": { + "description": "Contains a list of HealthSourcesScopedList.", + "id": "HealthSourceAggregatedList", "properties": { + "etag": { + "type": "string" + }, "id": { "description": "[Output Only] Unique identifier for the resource; defined by the server.", "type": "string" }, "items": { - "description": "A list of HttpHealthCheck resources.", - "items": { - "$ref": "HttpHealthCheck" + "additionalProperties": { + "$ref": "HealthSourcesScopedList", + "description": "Name of the scope containing this set of HealthSources." }, - "type": "array" + "description": "A list of HealthSourcesScopedList resources.", + "type": "object" }, "kind": { - "default": "compute#httpHealthCheckList", + "default": "compute#healthSourceAggregatedList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "HealthSourceList": { + "id": "HealthSourceList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of HealthSource resources.", + "items": { + "$ref": "HealthSource" + }, + "type": "array" + }, + "kind": { + "default": "compute#healthSourceList", + "description": "[Output Only] Type of the resource. Always compute#healthSource for health sources.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "HealthSourcesScopedList": { + "id": "HealthSourcesScopedList", + "properties": { + "resources": { + "description": "A list of HealthSources contained in this scope.", + "items": { + "$ref": "HealthSource" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of health sources when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "HealthStatus": { + "id": "HealthStatus", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata defined as annotations for network endpoint.", + "type": "object" + }, + "forwardingRule": { + "description": "URL of the forwarding rule associated with the health status of the instance.", + "type": "string" + }, + "forwardingRuleIp": { + "description": "A forwarding rule IP address assigned to this instance.", + "type": "string" + }, + "healthState": { + "description": "Health state of the IPv4 address of the instance.", + "enum": [ + "HEALTHY", + "UNHEALTHY" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "instance": { + "description": "URL of the instance resource.", + "type": "string" + }, + "ipAddress": { + "description": "For target pool based Network Load Balancing, it indicates the forwarding rule's IP address assigned to this instance. For other types of load balancing, the field indicates VM internal ip.", + "type": "string" + }, + "ipv6Address": { + "type": "string" + }, + "ipv6HealthState": { + "description": "Health state of the IPv6 address of the instance.", + "enum": [ + "HEALTHY", + "UNHEALTHY" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "port": { + "description": "The named port of the instance group, not necessarily the port that is health-checked.", + "format": "int32", + "type": "integer" + }, + "weight": { + "type": "string" + }, + "weightError": { + "enum": [ + "INVALID_WEIGHT", + "MISSING_WEIGHT", + "UNAVAILABLE_WEIGHT", + "WEIGHT_NONE" + ], + "enumDescriptions": [ + "The response to a Health Check probe had the HTTP response header field X-Load-Balancing-Endpoint-Weight, but its content was invalid (i.e., not a non-negative single-precision floating-point number in decimal string representation).", + "The response to a Health Check probe did not have the HTTP response header field X-Load-Balancing-Endpoint-Weight.", + "This is the value when the accompanied health status is either TIMEOUT (i.e.,the Health Check probe was not able to get a response in time) or UNKNOWN. For the latter, it should be typically because there has not been sufficient time to parse and report the weight for a new backend (which is with 0.0.0.0 ip address). However, it can be also due to an outage case for which the health status is explicitly reset to UNKNOWN.", + "This is the default value when WeightReportMode is DISABLE, and is also the initial value when WeightReportMode has just updated to ENABLE or DRY_RUN and there has not been sufficient time to parse and report the backend weight." + ], + "type": "string" + } + }, + "type": "object" + }, + "HealthStatusForNetworkEndpoint": { + "id": "HealthStatusForNetworkEndpoint", + "properties": { + "backendService": { + "$ref": "BackendServiceReference", + "description": "URL of the backend service associated with the health state of the network endpoint." + }, + "forwardingRule": { + "$ref": "ForwardingRuleReference", + "description": "URL of the forwarding rule associated with the health state of the network endpoint." + }, + "healthCheck": { + "$ref": "HealthCheckReference", + "description": "URL of the health check associated with the health state of the network endpoint." + }, + "healthCheckService": { + "$ref": "HealthCheckServiceReference", + "description": "URL of the health check service associated with the health state of the network endpoint." + }, + "healthState": { + "description": "Health state of the network endpoint determined based on the health checks configured.", + "enum": [ + "DRAINING", + "HEALTHY", + "UNHEALTHY", + "UNKNOWN" + ], + "enumDescriptions": [ + "Endpoint is being drained.", + "Endpoint is healthy.", + "Endpoint is unhealthy.", + "Health status of the endpoint is unknown." + ], + "type": "string" + }, + "ipv6HealthState": { + "description": "Health state of the ipv6 network endpoint determined based on the health checks configured.", + "enum": [ + "DRAINING", + "HEALTHY", + "UNHEALTHY", + "UNKNOWN" + ], + "enumDescriptions": [ + "Endpoint is being drained.", + "Endpoint is healthy.", + "Endpoint is unhealthy.", + "Health status of the endpoint is unknown." + ], + "type": "string" + } + }, + "type": "object" + }, + "Help": { + "description": "Provides links to documentation or for performing an out of band action. For example, if a quota check failed with an error indicating the calling project hasn't enabled the accessed service, this can contain a URL pointing directly to the right place in the developer console to flip the bit.", + "id": "Help", + "properties": { + "links": { + "description": "URL(s) pointing to additional information on handling the current error.", + "items": { + "$ref": "HelpLink" + }, + "type": "array" + } + }, + "type": "object" + }, + "HelpLink": { + "description": "Describes a URL link.", + "id": "HelpLink", + "properties": { + "description": { + "description": "Describes what the link offers.", + "type": "string" + }, + "url": { + "description": "The URL of the link.", + "type": "string" + } + }, + "type": "object" + }, + "HostRule": { + "description": "UrlMaps A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.", + "id": "HostRule", + "properties": { + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "hosts": { + "description": "The list of host patterns to match. They must be valid hostnames with optional port numbers in the format host:port. * matches any string of ([a-z0-9-.]*). In that case, * must be the first character, and if followed by anything, the immediate following character must be either - or .. * based matching is not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pathMatcher": { + "description": "The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion.", + "type": "string" + } + }, + "type": "object" + }, + "HttpFaultAbort": { + "description": "Specification for how requests are aborted as part of fault injection.", + "id": "HttpFaultAbort", + "properties": { + "httpStatus": { + "description": "The HTTP status code used to abort the request. The value must be from 200 to 599 inclusive. For gRPC protocol, the gRPC status code is mapped to HTTP status code according to this mapping table. HTTP status 200 is mapped to gRPC status UNKNOWN. Injecting an OK status is currently not supported by Traffic Director.", + "format": "uint32", + "type": "integer" + }, + "percentage": { + "description": "The percentage of traffic for connections, operations, or requests that is aborted as part of fault injection. The value must be from 0.0 to 100.0 inclusive.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "HttpFaultDelay": { + "description": "Specifies the delay introduced by the load balancer before forwarding the request to the backend service as part of fault injection.", + "id": "HttpFaultDelay", + "properties": { + "fixedDelay": { + "$ref": "Duration", + "description": "Specifies the value of the fixed delay interval." + }, + "percentage": { + "description": "The percentage of traffic for connections, operations, or requests for which a delay is introduced as part of fault injection. The value must be from 0.0 to 100.0 inclusive.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "HttpFaultInjection": { + "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by the load balancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the load balancer for a percentage of requests.", + "id": "HttpFaultInjection", + "properties": { + "abort": { + "$ref": "HttpFaultAbort", + "description": "The specification for how client requests are aborted as part of fault injection." + }, + "delay": { + "$ref": "HttpFaultDelay", + "description": "The specification for how client requests are delayed as part of fault injection, before being sent to a backend service." + } + }, + "type": "object" + }, + "HttpFilterConfig": { + "description": "HttpFilterConfiguration supplies additional contextual settings for networkservices.HttpFilter resources enabled by Traffic Director.", + "id": "HttpFilterConfig", + "properties": { + "config": { + "description": "The configuration needed to enable the networkservices.HttpFilter resource. The configuration must be YAML formatted and only contain fields defined in the protobuf identified in configTypeUrl", + "type": "string" + }, + "configTypeUrl": { + "description": "The fully qualified versioned proto3 type url of the protobuf that the filter expects for its contextual settings, for example: type.googleapis.com/google.protobuf.Struct", + "type": "string" + }, + "filterName": { + "description": "Name of the networkservices.HttpFilter resource this configuration belongs to. This name must be known to the xDS client. Example: envoy.wasm", + "type": "string" + } + }, + "type": "object" + }, + "HttpHeaderAction": { + "description": "The request and response header transformations that take effect before the request is passed along to the selected backendService.", + "id": "HttpHeaderAction", + "properties": { + "requestHeadersToAdd": { + "description": "Headers to add to a matching request before forwarding the request to the backendService.", + "items": { + "$ref": "HttpHeaderOption" + }, + "type": "array" + }, + "requestHeadersToRemove": { + "description": "A list of header names for headers that need to be removed from the request before forwarding the request to the backendService.", + "items": { + "type": "string" + }, + "type": "array" + }, + "responseHeadersToAdd": { + "description": "Headers to add the response before sending the response back to the client.", + "items": { + "$ref": "HttpHeaderOption" + }, + "type": "array" + }, + "responseHeadersToRemove": { + "description": "A list of header names for headers that need to be removed from the response before sending the response back to the client.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "HttpHeaderMatch": { + "description": "matchRule criteria for request header matches.", + "id": "HttpHeaderMatch", + "properties": { + "exactMatch": { + "description": "The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", + "type": "string" + }, + "headerName": { + "description": "The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name \":authority\". For matching a request's method, use the headerName \":method\". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the `content-type` header are supported. The following transport-level headers cannot be used in header matching rules: `:authority`, `:method`, `:path`, `:scheme`, `user-agent`, `accept-encoding`, `content-encoding`, `grpc-accept-encoding`, `grpc-encoding`, `grpc-previous-rpc-attempts`, `grpc-tags-bin`, `grpc-timeout` and `grpc-trace-bin`.", + "type": "string" + }, + "invertMatch": { + "description": "If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false. ", + "type": "boolean" + }, + "prefixMatch": { + "description": "The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", + "type": "string" + }, + "presentMatch": { + "description": "A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", + "type": "boolean" + }, + "rangeMatch": { + "$ref": "Int64RangeMatch", + "description": "The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL." + }, + "regexMatch": { + "description": "The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.", + "type": "string" + }, + "suffixMatch": { + "description": "The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.", + "type": "string" + } + }, + "type": "object" + }, + "HttpHeaderOption": { + "description": "Specification determining how headers are added to requests or responses.", + "id": "HttpHeaderOption", + "properties": { + "headerName": { + "description": "The name of the header.", + "type": "string" + }, + "headerValue": { + "description": "The value of the header to add.", + "type": "string" + }, + "replace": { + "description": "If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. The default value is false. ", + "type": "boolean" + } + }, + "type": "object" + }, + "HttpHealthCheck": { + "description": "Represents a legacy HTTP Health Check resource. Legacy HTTP health checks are now only required by target pool-based network load balancers. For all other load balancers, including backend service-based network load balancers, and for managed instance group auto-healing, you must use modern (non-legacy) health checks. For more information, see Health checks overview .", + "id": "HttpHealthCheck", + "properties": { + "checkIntervalSec": { + "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", + "format": "int32", + "type": "integer" + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "healthyThreshold": { + "description": "A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.", + "format": "int32", + "type": "integer" + }, + "host": { + "description": "The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#httpHealthCheck", + "description": "[Output Only] Type of the resource. Always compute#httpHealthCheck for HTTP health checks.", + "type": "string" + }, + "name": { + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "port": { + "description": "The TCP port number for the HTTP health check request. The default value is 80.", + "format": "int32", + "type": "integer" + }, + "requestPath": { + "description": "The request path of the HTTP health check request. The default value is /. This field does not support query parameters. Must comply with RFC3986.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + }, + "timeoutSec": { + "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.", + "format": "int32", + "type": "integer" + }, + "unhealthyThreshold": { + "description": "A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "HttpHealthCheckList": { + "description": "Contains a list of HttpHealthCheck resources.", + "id": "HttpHealthCheckList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of HttpHealthCheck resources.", + "items": { + "$ref": "HttpHealthCheck" + }, + "type": "array" + }, + "kind": { + "default": "compute#httpHealthCheckList", "description": "Type of resource.", "type": "string" }, @@ -67626,6 +68803,20 @@ ], "type": "string" }, + "disruptionSchedule": { + "description": "The disruption schedule for the VM. Default to IMMEDIATE.", + "enum": [ + "DISRUPTION_SCHEDULE_UNSPECIFIED", + "FUTURE", + "IMMEDIATE" + ], + "enumDescriptions": [ + "Not used. Required as per aip/126.", + "Delay disruption for caller control. Will be default soon.", + "Default value. Disrupt the VM immediately." + ], + "type": "string" + }, "faultReasons": { "items": { "$ref": "InstancesReportHostAsFaultyRequestFaultReason" @@ -69736,6 +70927,247 @@ }, "type": "object" }, + "InterconnectAttachmentGroupsCreateMembers": { + "id": "InterconnectAttachmentGroupsCreateMembers", + "properties": { + "attachments": { + "description": "Parameters for the specific Attachments to create.", + "items": { + "$ref": "InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput" + }, + "type": "array" + }, + "intentMismatchBehavior": { + "description": "How to behave when configured.availabilitySLA.effectiveSLA would not equal intent.availabilitySLA after this call.", + "enum": [ + "CREATE", + "REJECT", + "UNSPECIFIED" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "templateAttachment": { + "$ref": "InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput", + "description": "Default parameters for the Attachments to create in this call." + } + }, + "type": "object" + }, + "InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput": { + "description": "LINT.IfChange Parameters used to create an InterconnectAttachment. This is similar to InterconnectAttachment, but the region field used here is not output only and all other output only fields are excluded.", + "id": "InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput", + "properties": { + "adminEnabled": { + "description": "Determines whether this Attachment will carry packets. Not present for PARTNER_PROVIDER.", + "type": "boolean" + }, + "bandwidth": { + "description": "Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER_PROVIDER and DEDICATED, and can take one of the following values: - BPS_50M: 50 Mbit/s - BPS_100M: 100 Mbit/s - BPS_200M: 200 Mbit/s - BPS_300M: 300 Mbit/s - BPS_400M: 400 Mbit/s - BPS_500M: 500 Mbit/s - BPS_1G: 1 Gbit/s - BPS_2G: 2 Gbit/s - BPS_5G: 5 Gbit/s - BPS_10G: 10 Gbit/s - BPS_20G: 20 Gbit/s - BPS_50G: 50 Gbit/s - BPS_100G: 100 Gbit/s ", + "enum": [ + "BPS_100G", + "BPS_100M", + "BPS_10G", + "BPS_1G", + "BPS_200M", + "BPS_20G", + "BPS_2G", + "BPS_300M", + "BPS_400M", + "BPS_500M", + "BPS_50G", + "BPS_50M", + "BPS_5G" + ], + "enumDescriptions": [ + "100 Gbit/s", + "100 Mbit/s", + "10 Gbit/s", + "1 Gbit/s", + "200 Mbit/s", + "20 Gbit/s", + "2 Gbit/s", + "300 Mbit/s", + "400 Mbit/s", + "500 Mbit/s", + "50 Gbit/s", + "50 Mbit/s", + "5 Gbit/s" + ], + "type": "string" + }, + "candidateCloudRouterIpAddress": { + "description": "Single IPv4 address + prefix length to be configured on the cloud router interface for this interconnect attachment. - Both candidate_cloud_router_ip_address and candidate_customer_router_ip_address fields must be set or both must be unset. - Prefix length of both candidate_cloud_router_ip_address and candidate_customer_router_ip_address must be the same. - Max prefix length is 31. ", + "type": "string" + }, + "candidateCloudRouterIpv6Address": { + "description": "Single IPv6 address + prefix length to be configured on the cloud router interface for this interconnect attachment. - Both candidate_cloud_router_ipv6_address and candidate_customer_router_ipv6_address fields must be set or both must be unset. - Prefix length of both candidate_cloud_router_ipv6_address and candidate_customer_router_ipv6_address must be the same. - Max prefix length is 126. ", + "type": "string" + }, + "candidateCustomerRouterIpAddress": { + "description": "Single IPv4 address + prefix length to be configured on the customer router interface for this interconnect attachment.", + "type": "string" + }, + "candidateCustomerRouterIpv6Address": { + "description": "Single IPv6 address + prefix length to be configured on the customer router interface for this interconnect attachment.", + "type": "string" + }, + "candidateIpv6Subnets": { + "description": "This field is not available.", + "items": { + "type": "string" + }, + "type": "array" + }, + "candidateSubnets": { + "description": "Input only. Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). Google will attempt to select an unused /29 from the supplied candidate prefix(es). The request will fail if all possible /29s are in use on Google's edge. If not supplied, Google will randomly select an unused /29 from all of link-local space.", + "items": { + "type": "string" + }, + "type": "array" + }, + "cloudRouterIpv6InterfaceId": { + "description": "This field is not available.", + "type": "string" + }, + "customerRouterIpv6InterfaceId": { + "description": "This field is not available.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource.", + "type": "string" + }, + "edgeAvailabilityDomain": { + "description": "Input only. Desired availability domain for the attachment. Only available for type PARTNER, at creation time, and can take one of the following values: - AVAILABILITY_DOMAIN_ANY - AVAILABILITY_DOMAIN_1 - AVAILABILITY_DOMAIN_2 For improved reliability, customers should configure a pair of attachments, one per availability domain. The selected availability domain will be provided to the Partner via the pairing key, so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY.", + "enum": [ + "AVAILABILITY_DOMAIN_1", + "AVAILABILITY_DOMAIN_2", + "AVAILABILITY_DOMAIN_ANY" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "encryption": { + "description": "Indicates the user-supplied encryption option of this VLAN attachment (interconnectAttachment). Can only be specified at attachment creation for PARTNER or DEDICATED attachments. Possible values are: - alpha - This is the default value, which means that the VLAN attachment carries unencrypted traffic. VMs are able to send traffic to, or receive traffic from, such a VLAN attachment. - IPSEC - The VLAN attachment carries only encrypted traffic that is encrypted by an IPsec device, such as an HA VPN gateway or third-party IPsec VPN. VMs cannot directly send traffic to, or receive traffic from, such a VLAN attachment. To use *HA VPN over Cloud Interconnect*, the VLAN attachment must be created with this option. ", + "enum": [ + "IPSEC", + "NONE" + ], + "enumDescriptions": [ + "The interconnect attachment will carry only encrypted traffic that is encrypted by an IPsec device such as HA VPN gateway; VMs cannot directly send traffic to or receive traffic from such an interconnect attachment. To use HA VPN over Cloud Interconnect, the interconnect attachment must be created with this option.", + "This is the default value, which means the Interconnect Attachment will carry unencrypted traffic. VMs will be able to send traffic to or receive traffic from such interconnect attachment." + ], + "type": "string" + }, + "interconnect": { + "description": "URL of the underlying Interconnect object that this attachment's traffic will traverse through.", + "type": "string" + }, + "ipsecInternalAddresses": { + "description": "A list of URLs of addresses that have been reserved for the VLAN attachment. Used only for the VLAN attachment that has the encryption option as IPSEC. The addresses must be regional internal IP address ranges. When creating an HA VPN gateway over the VLAN attachment, if the attachment is configured to use a regional internal IP address, then the VPN gateway's IP address is allocated from the IP address range specified here. For example, if the HA VPN gateway's interface 0 is paired to this VLAN attachment, then a regional internal IP address for the VPN gateway interface 0 will be allocated from the IP address specified for this VLAN attachment. If this field is not specified when creating the VLAN attachment, then later on when creating an HA VPN gateway on this VLAN attachment, the HA VPN gateway's IP address is allocated from the regional external IP address pool.", + "items": { + "type": "string" + }, + "type": "array" + }, + "l2Forwarding": { + "$ref": "InterconnectAttachmentL2Forwarding", + "description": "L2 Interconnect Attachment related config. This field is required if the type is L2_DEDICATED. The configuration specifies how VLAN tags (like dot1q, qinq, or dot1ad) within L2 packets are mapped to the destination appliances IP addresses. The packet is then encapsulated with the appliance IP address and sent to the edge appliance." + }, + "mtu": { + "description": "Maximum Transmission Unit (MTU), in bytes, of packets passing through this interconnect attachment. Only 1440 and 1500 are allowed. If not specified, the value will default to 1440.", + "format": "int32", + "type": "integer" + }, + "multicastEnabled": { + "description": "Whether or not to permit multicast traffic for this attachment. Multicast packets will be dropped if this is not enabled.", + "type": "boolean" + }, + "name": { + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "pairingKey": { + "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier of a PARTNER attachment used to initiate provisioning with a selected partner. Of the form \"XXXXX/region/domain\"", + "type": "string" + }, + "partnerAsn": { + "description": "Optional BGP ASN for the router supplied by a Layer 3 Partner if they configured BGP on behalf of the customer. Output only for PARTNER type, input only for PARTNER_PROVIDER, not available for DEDICATED.", + "format": "int64", + "type": "string" + }, + "partnerMetadata": { + "$ref": "InterconnectAttachmentPartnerMetadata", + "description": "Informational metadata about Partner attachments from Partners to display to customers. Output only for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED." + }, + "region": { + "description": "The region that the Attachment is in.", + "type": "string" + }, + "router": { + "description": "URL of the Cloud Router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network \u0026 region within which the Cloud Router is configured.", + "type": "string" + }, + "stackType": { + "description": "The stack type for this interconnect attachment to identify whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will be used. This field can be both set at interconnect attachments creation and update interconnect attachment operations.", + "enum": [ + "IPV4_IPV6", + "IPV4_ONLY" + ], + "enumDescriptions": [ + "The interconnect attachment can have both IPv4 and IPv6 addresses.", + "The interconnect attachment will only be assigned IPv4 addresses." + ], + "type": "string" + }, + "subnetLength": { + "description": "Input only. Length of the IPv4 subnet mask. Allowed values: - 29 (default) - 30 The default value is 29, except for Cross-Cloud Interconnect connections that use an InterconnectRemoteLocation with a constraints.subnetLengthRange.min equal to 30. For example, connections that use an Azure remote location fall into this category. In these cases, the default value is 30, and requesting 29 returns an error. Where both 29 and 30 are allowed, 29 is preferred, because it gives Google Cloud Support more debugging visibility. ", + "format": "int32", + "type": "integer" + }, + "type": { + "description": "The type of interconnect attachment this is, which can take one of the following values: - DEDICATED: an attachment to a Dedicated Interconnect. - PARTNER: an attachment to a Partner Interconnect, created by the customer. - PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by the partner. ", + "enum": [ + "DEDICATED", + "L2_DEDICATED", + "PARTNER", + "PARTNER_PROVIDER" + ], + "enumDescriptions": [ + "Attachment to a dedicated interconnect.", + "Attachment to a L2 interconnect, created by the customer.", + "Attachment to a partner interconnect, created by the customer.", + "Attachment to a partner interconnect, created by the partner." + ], + "type": "string" + }, + "vlanTag8021q": { + "description": "The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4093. Only specified at creation time.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InterconnectAttachmentGroupsCreateMembersRequest": { + "id": "InterconnectAttachmentGroupsCreateMembersRequest", + "properties": { + "request": { + "$ref": "InterconnectAttachmentGroupsCreateMembers" + } + }, + "type": "object" + }, "InterconnectAttachmentGroupsGetOperationalStatusResponse": { "description": "Response for the InterconnectAttachmentGroupsGetOperationalStatusResponse.", "id": "InterconnectAttachmentGroupsGetOperationalStatusResponse", @@ -71006,19 +72438,6 @@ }, "type": "object" }, - "InterconnectGroupsCreateMembersResponse": { - "description": "Response for the InterconnectGroupsCreateMembersRequest.", - "id": "InterconnectGroupsCreateMembersResponse", - "properties": { - "etag": { - "type": "string" - }, - "result": { - "$ref": "InterconnectGroup" - } - }, - "type": "object" - }, "InterconnectGroupsGetOperationalStatusResponse": { "description": "Response for the InterconnectGroupsGetOperationalStatusResponse.", "id": "InterconnectGroupsGetOperationalStatusResponse", @@ -71503,7 +72922,7 @@ "type": "string" }, "crossSiteInterconnectInfos": { - "description": "[Output Only] A list of InterconnectLocation.CrossSiteInterconnectInfo objects, that describe parameters pertaining to the relation between this InterconnectLocation and various Interconnect metros.", + "description": "[Output Only] A list of InterconnectLocation.CrossSiteInterconnectInfo objects, that describe where Cross-Site Interconnect wires may connect to from this location and associated connection parameters. Cross-Site Interconnect isn't allowed to locations which are not listed.", "items": { "$ref": "InterconnectLocationCrossSiteInterconnectInfo" }, @@ -71574,11 +72993,11 @@ "type": "object" }, "InterconnectLocationCrossSiteInterconnectInfo": { - "description": "Information about any potential WireGroups between an Interconnect at a specific InterconnectLocation, and an Interconnect in another metro.", + "description": "Information about Cross-Site Interconnect wires which may be created between the containing location and another remote location.", "id": "InterconnectLocationCrossSiteInterconnectInfo", "properties": { "city": { - "description": "Metropolitan area designator", + "description": "The remote location for Cross-Site Interconnect wires. This specifies an InterconnectLocation city (metropolitan area designator), which itself may match multiple InterconnectLocations.", "type": "string" }, "maxSingleFlowGbps": { @@ -74485,11 +75904,13 @@ "provisioningModel": { "description": "The provisioning model to be used for this instance.", "enum": [ + "FLEX_START", "RESERVATION_BOUND", "SPOT", "STANDARD" ], "enumDescriptions": [ + "Instance is provisioned with DWS Flex Start and have limited max run duration.", "Bound to the lifecycle of the reservation in which it is provisioned.", "Heavily discounted, no guaranteed runtime.", "Standard provisioning with user controlled runtime, no discounts." @@ -74604,11 +76025,13 @@ "provisioningModel": { "description": "The provisioning model to be used for this instance.", "enum": [ + "FLEX_START", "RESERVATION_BOUND", "SPOT", "STANDARD" ], "enumDescriptions": [ + "Instance is provisioned with DWS Flex Start and have limited max run duration.", "Bound to the lifecycle of the reservation in which it is provisioned.", "Heavily discounted, no guaranteed runtime.", "Standard provisioning with user controlled runtime, no discounts." @@ -74808,6 +76231,215 @@ }, "type": "object" }, + "MultiMigMember": { + "description": "Represents a Multi-MIG member resource.", + "id": "MultiMigMember", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp of this multi-MIG member in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource.", + "type": "string" + }, + "id": { + "description": "[Output only] The unique identifier for this resource type. The server generates this identifier.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#multiMigMember", + "description": "Type of the resource. Always compute#multiMigMember for a list of multi-MIG members.", + "type": "string" + }, + "name": { + "description": "[Output Only] The name of this multi-MIG member generated by Google Compute Engine.", + "type": "string" + }, + "region": { + "description": "[Output Only] The URL of the region where the multi-MIG resides.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined fully-qualified URL for this resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + }, + "status": { + "$ref": "MultiMigMemberStatus", + "description": "[Output Only] The status of this multi-MIG member" + } + }, + "type": "object" + }, + "MultiMigMemberList": { + "id": "MultiMigMemberList", + "properties": { + "id": { + "description": "Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of multi-MIG member resources.", + "items": { + "$ref": "MultiMigMember" + }, + "type": "array" + }, + "kind": { + "default": "compute#multiMigMemberList", + "description": "Type of the resource. Always compute#multiMigMember for a list of multi-MIG members.", + "type": "string" + }, + "nextPageToken": { + "description": "This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "MultiMigMemberStatus": { + "id": "MultiMigMemberStatus", + "properties": { + "instanceGroupManager": { + "description": "[Output Only] URL of member instance group manager", + "type": "string" + } + }, + "type": "object" + }, "MultiMigResourcePolicies": { "description": "Resource policies message for a multi-MIG. Specifies the workload policy configuration of the multi-MIG.", "id": "MultiMigResourcePolicies", @@ -76230,10 +77862,6 @@ "description": "Optional port number of network endpoint. If not specified, the defaultPort for the network endpoint group will be used. This field can not be set for network endpoints of type GCE_VM_IP.", "format": "int32", "type": "integer" - }, - "zone": { - "description": "The name of the zone where the instance hosting the network endpoint is located (valid only for regional GCE_VM_IP_PORT NEGs). It should comply with RFC1035. The zone must belong to the region of the Network Endpoint Group.", - "type": "string" } }, "type": "object" @@ -90665,14 +92293,14 @@ "type": "boolean" }, "exportPolicies": { - "description": "List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.", + "description": "List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type.", "items": { "type": "string" }, "type": "array" }, "importPolicies": { - "description": "List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.", + "description": "List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type.", "items": { "type": "string" }, @@ -91405,6 +93033,10 @@ }, "type": "array" }, + "nccGateway": { + "description": "URI of the ncc_gateway to which this router associated.", + "type": "string" + }, "network": { "description": "URI of the network to which this router belongs.", "type": "string" @@ -92656,11 +94288,13 @@ "provisioningModel": { "description": "Specifies the provisioning model of the instance.", "enum": [ + "FLEX_START", "RESERVATION_BOUND", "SPOT", "STANDARD" ], "enumDescriptions": [ + "Instance is provisioned with DWS Flex Start and have limited max run duration.", "Bound to the lifecycle of the reservation in which it is provisioned.", "Heavily discounted, no guaranteed runtime.", "Standard provisioning with user controlled runtime, no discounts." @@ -95671,7 +97305,7 @@ "description": "Customer provided encryption key when creating Snapshot from Instant Snapshot." }, "sourceInstantSnapshotId": { - "description": "[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.", + "description": "[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this snapshot. For example, if you created the snapshot from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.", "type": "string" }, "sourceSnapshotSchedulePolicy": { @@ -99491,7 +101125,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION, PRIVATE_SERVICE_CONNECT or PRIVATE_NAT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. A subnet with purpose set to PRIVATE_NAT is used for Private NAT IP address by Private NAT Gateway. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "AGGREGATE", "CLOUD_EXTENSION", @@ -105231,7 +106865,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION, PRIVATE_SERVICE_CONNECT or PRIVATE_NAT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. A subnet with purpose set to PRIVATE_NAT is used for Private NAT IP address by Private NAT Gateway. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "AGGREGATE", "CLOUD_EXTENSION", @@ -107313,7 +108947,7 @@ "type": "string" }, "vlanTags": { - "description": "To configure the wire group for VLAN mode, enter a VLAN tag, which is a number from `2` to `4093`. You can autoallocate a tag by entering `0`. To configure the wire group for port mode, enter `-1`. Review the following guidelines: - A VLAN tag must be unique for an Interconnect connection across all attachments and wire groups. - Both endpoints of a wire must use the same VLAN tag value. - Single wire and redundant type wire groups must have only one VLAN tag. - Box and cross type wire groups must have two VLAN tags. The first is for the same-zone pseudowire, and the second is for the cross-zone pseudowire. - Port mode pseudowires must configure a value of `-1` for both endpoints. ", + "description": "To configure the wire group for VLAN mode, enter a VLAN tag, which is a number from `2` to `4093`. You can autoallocate a tag by entering `0`. To configure the wire group for port mode, enter `-1`. Review the following guidelines: - A VLAN tag must be unique for an Interconnect connection across all attachments and wire groups. - Both endpoints of a wire must use the same VLAN tag value. - Single wire and redundant type wire groups must have only one VLAN tag. - Port mode pseudowires must have a single VLAN tag with a value of `-1` for both endpoints. - Box and cross type wire groups must have two VLAN tags. The first is for the same-zone pseudowire, and the second is for the cross-zone pseudowire. ", "items": { "format": "int32", "type": "integer" @@ -107598,7 +109232,7 @@ "type": "string" }, "bandwidthUnmetered": { - "description": "The unmetered bandwidth in Gigabits per second, using decimal units. `10` is 10 Gbps, `100` is 100 Gbps. Must be a multiple of 10.", + "description": "The unmetered bandwidth in Gigabits per second, using decimal units. `10` is 10 Gbps, `100` is 100 Gbps.", "format": "int64", "type": "string" }, @@ -107621,8 +109255,8 @@ "GOLD" ], "enumDescriptions": [ - "The default service class.", - "A higher service class." + "The lowest service class.", + "The highest service class." ], "type": "string" } diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index d40b1da700f..0b0494f7e5b 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -212,6 +212,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err s.RegionDisks = NewRegionDisksService(s) s.RegionHealthCheckServices = NewRegionHealthCheckServicesService(s) s.RegionHealthChecks = NewRegionHealthChecksService(s) + s.RegionHealthSources = NewRegionHealthSourcesService(s) s.RegionInstanceGroupManagerResizeRequests = NewRegionInstanceGroupManagerResizeRequestsService(s) s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) @@ -219,6 +220,7 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err s.RegionInstances = NewRegionInstancesService(s) s.RegionInstantSnapshotGroups = NewRegionInstantSnapshotGroupsService(s) s.RegionInstantSnapshots = NewRegionInstantSnapshotsService(s) + s.RegionMultiMigMembers = NewRegionMultiMigMembersService(s) s.RegionMultiMigs = NewRegionMultiMigsService(s) s.RegionNetworkEndpointGroups = NewRegionNetworkEndpointGroupsService(s) s.RegionNetworkFirewallPolicies = NewRegionNetworkFirewallPoliciesService(s) @@ -423,6 +425,8 @@ type Service struct { RegionHealthChecks *RegionHealthChecksService + RegionHealthSources *RegionHealthSourcesService + RegionInstanceGroupManagerResizeRequests *RegionInstanceGroupManagerResizeRequestsService RegionInstanceGroupManagers *RegionInstanceGroupManagersService @@ -437,6 +441,8 @@ type Service struct { RegionInstantSnapshots *RegionInstantSnapshotsService + RegionMultiMigMembers *RegionMultiMigMembersService + RegionMultiMigs *RegionMultiMigsService RegionNetworkEndpointGroups *RegionNetworkEndpointGroupsService @@ -1129,6 +1135,15 @@ type RegionHealthChecksService struct { s *Service } +func NewRegionHealthSourcesService(s *Service) *RegionHealthSourcesService { + rs := &RegionHealthSourcesService{s: s} + return rs +} + +type RegionHealthSourcesService struct { + s *Service +} + func NewRegionInstanceGroupManagerResizeRequestsService(s *Service) *RegionInstanceGroupManagerResizeRequestsService { rs := &RegionInstanceGroupManagerResizeRequestsService{s: s} return rs @@ -1192,6 +1207,15 @@ type RegionInstantSnapshotsService struct { s *Service } +func NewRegionMultiMigMembersService(s *Service) *RegionMultiMigMembersService { + rs := &RegionMultiMigMembersService{s: s} + return rs +} + +type RegionMultiMigMembersService struct { + s *Service +} + func NewRegionMultiMigsService(s *Service) *RegionMultiMigsService { rs := &RegionMultiMigsService{s: s} return rs @@ -2999,8 +3023,10 @@ type AllocationAggregateReservation struct { // "VM_FAMILY_CLOUD_TPU_DEVICE_CT3" // "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L" // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP" + // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E" // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P" // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" + // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" VmFamily string `json:"vmFamily,omitempty"` // WorkloadType: The workload type of the instances that will target this // reservation. @@ -3105,6 +3131,8 @@ func (s AllocationReservationSharingPolicy) MarshalJSON() ([]byte, error) { // AllocationResourceStatus: [Output Only] Contains output only fields. type AllocationResourceStatus struct { + // AggregateAllocation: Properties of this aggregatereservation. + AggregateAllocation *AllocationResourceStatusAggregateAllocation `json:"aggregateAllocation,omitempty"` // ReservationBlockCount: The number of reservation blocks associated with this // reservation. ReservationBlockCount int64 `json:"reservationBlockCount,omitempty"` @@ -3112,15 +3140,15 @@ type AllocationResourceStatus struct { ReservationMaintenance *GroupMaintenanceInfo `json:"reservationMaintenance,omitempty"` // SpecificSkuAllocation: Allocation Properties of this reservation. SpecificSkuAllocation *AllocationResourceStatusSpecificSKUAllocation `json:"specificSkuAllocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReservationBlockCount") to + // ForceSendFields is a list of field names (e.g. "AggregateAllocation") 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. "ReservationBlockCount") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "AggregateAllocation") 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:"-"` } @@ -3130,6 +3158,30 @@ func (s AllocationResourceStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AllocationResourceStatusAggregateAllocation: Contains Properties set for the +// aggregate reservation. +type AllocationResourceStatusAggregateAllocation struct { + // Utilizations: Per service utilization breakdown. The Key is the Google Cloud + // managed service name. + Utilizations map[string]string `json:"utilizations,omitempty"` + // ForceSendFields is a list of field names (e.g. "Utilizations") 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. "Utilizations") 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 AllocationResourceStatusAggregateAllocation) MarshalJSON() ([]byte, error) { + type NoMethod AllocationResourceStatusAggregateAllocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // AllocationResourceStatusSpecificSKUAllocation: Contains Properties set for // the reservation. type AllocationResourceStatusSpecificSKUAllocation struct { @@ -5571,7 +5623,7 @@ type BackendCustomMetric struct { // MaxUtilization: Optional parameter to define a target utilization for the // Custom Metrics balancing mode. The valid range is [0.0, 1.0]. MaxUtilization float64 `json:"maxUtilization,omitempty"` - // Name: Name of a custom utilization signal. The name must be 1-24 characters + // Name: Name of a custom utilization signal. The name must be 1-64 characters // long and match the regular expression a-z ([-_.a-z0-9]*[a-z0-9])? which // means the first character must be a lowercase letter, and all following // characters must be a dash, period, underscore, lowercase letter, or digit, @@ -6522,7 +6574,7 @@ func (s BackendServiceConnectionTrackingPolicy) MarshalJSON() ([]byte, error) { type BackendServiceCustomMetric struct { // DryRun: If true, the metric data is not used for load balancing. DryRun bool `json:"dryRun,omitempty"` - // Name: Name of a custom utilization signal. The name must be 1-24 characters + // Name: Name of a custom utilization signal. The name must be 1-64 characters // long and match the regular expression a-z ([-_.a-z0-9]*[a-z0-9])? which // means the first character must be a lowercase letter, and all following // characters must be a dash, period, underscore, lowercase letter, or digit, @@ -8271,6 +8323,54 @@ func (s BulkInsertOperationStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BulkSetLabelsRequest struct { + // LabelFingerprint: The fingerprint of the previous set of labels for this + // resource, used to detect conflicts. The fingerprint is initially generated + // by Compute Engine and changes after every request to modify or update + // labels. You may optionally provide an up-to-date fingerprint hash in order + // to update or change labels. Make a get() request to the resource to get the + // latest fingerprint. + LabelFingerprint string `json:"labelFingerprint,omitempty"` + // Labels: The labels to set for this resource. + Labels map[string]string `json:"labels,omitempty"` + // ForceSendFields is a list of field names (e.g. "LabelFingerprint") 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. "LabelFingerprint") 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 BulkSetLabelsRequest) MarshalJSON() ([]byte, error) { + type NoMethod BulkSetLabelsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type BulkZoneSetLabelsRequest struct { + Requests []*BulkSetLabelsRequest `json:"requests,omitempty"` + // ForceSendFields is a list of field names (e.g. "Requests") 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. "Requests") 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 BulkZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { + type NoMethod BulkZoneSetLabelsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type BundledLocalSsds struct { // DefaultInterface: The default disk interface if the interface is not // specified. @@ -8296,7 +8396,13 @@ func (s BundledLocalSsds) MarshalJSON() ([]byte, error) { } type CacheInvalidationRule struct { - // CacheTags: Not implemented. + // CacheTags: A list of cache tags used to identify cached objects. - Cache + // tags are specified when the response is first cached, by setting the + // `Cache-Tag` response header at the origin. - Multiple cache tags in the same + // invalidation request are treated as Boolean `OR` - for example, `tag1 OR + // tag2 OR tag3`. - If other fields are also specified, these are treated as + // Boolean `AND` with any tags. Up to 10 tags can be specified in a single + // invalidation request. CacheTags []string `json:"cacheTags,omitempty"` // Host: If set, this invalidation rule will only apply to requests with a Host // header matching host. @@ -10725,18 +10831,26 @@ type DiskPairReplicationState struct { // ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY: The primary disk is healthily // replicating to the secondary device i.e. last_replication_time is within // RPO. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN: The - // replication is lagging above the SLO limit due to some internal issue. - + // replication is lagging above the SLO limit due to the disk's change rate + // being above the supported limit. - // ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING: The replication // is lagging, and the RPO is not being met due to some internal issue. - // ASYNC_REPLICATION_STATE_REPLICATION_STUCK: The replication is completely // stuck due to some internal error. - ASYNC_REPLICATION_STATE_STOPPING: The // replication is under the process of being stopped. This is a transient // state. - ASYNC_REPLICATION_STATE_STOPPED: The replication between the - // disk-pairs have stopped. + // disk-pairs have stopped. - + // ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_CG_HIGH_CHURN: The replication is + // lagging above the SLO limit for the disk in the consistency group due to + // disk's change rate being above the supported limit. // // Possible values: // "ASYNC_REPLICATION_STATE_INITIALIZING" - The device is doing the initial // replication after starting the replication. + // "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_CG_HIGH_CHURN" - The + // replication is lagging behind (last_replication_time > RPO) for the disk in + // a consistency group because some other disk is writing the data at a rate + // above the supported limit. // "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN" - The replication // is lagging behind (last_replication_time > RPO), because the disk's change // rate is above the supported limit. @@ -10894,6 +11008,14 @@ type DiskSettingsAccessLocation struct { // Locations: List of regions that can create a regional snapshot from the // current region Locations map[string]DiskSettingsAccessLocationAccessLocationPreference `json:"locations,omitempty"` + // Policy: Policy of which location is allowed to access snapshot. + // + // Possible values: + // "ALL_REGIONS" - Any regions will be able to access the source location. + // "POLICY_UNSPECIFIED" + // "SPECIFIC_REGIONS" - Only allowlisted regions will be able to create + // region scoped snapshots + Policy string `json:"policy,omitempty"` // ForceSendFields is a list of field names (e.g. "Locations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -15567,8 +15689,10 @@ type FutureResourcesSpecAggregateResources struct { // "VM_FAMILY_CLOUD_TPU_DEVICE_CT3" // "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L" // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP" + // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E" // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P" // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" + // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" VmFamily string `json:"vmFamily,omitempty"` // WorkloadType: Workload type. Use for TPU reservations. // @@ -17107,44 +17231,718 @@ type HealthCheckServiceAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s HealthCheckServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServiceAggregatedListWarningData +func (s HealthCheckServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServiceAggregatedListWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// HealthCheckServiceReference: A full or valid partial URL to a health check +// service. For example, the following are valid URLs: - +// https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service +// - +// projects/project-id/regions/us-west1/healthCheckServices/health-check-service +// - regions/us-west1/healthCheckServices/health-check-service +type HealthCheckServiceReference struct { + HealthCheckService string `json:"healthCheckService,omitempty"` + // ForceSendFields is a list of field names (e.g. "HealthCheckService") 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. "HealthCheckService") 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 HealthCheckServiceReference) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServiceReference + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type HealthCheckServicesList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + // Items: A list of HealthCheckService resources. + Items []*HealthCheckService `json:"items,omitempty"` + // Kind: [Output Only] Type of the resource. Always + // compute#healthCheckServicesList for lists of HealthCheckServices. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will have their + // own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HealthCheckServicesListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 HealthCheckServicesList) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServicesList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// HealthCheckServicesListWarning: [Output Only] Informational warning message. +type HealthCheckServicesListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*HealthCheckServicesListWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 HealthCheckServicesListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServicesListWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type HealthCheckServicesListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 HealthCheckServicesListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServicesListWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type HealthCheckServicesScopedList struct { + // Resources: A list of HealthCheckServices contained in this scope. + Resources []*HealthCheckService `json:"resources,omitempty"` + // Warning: Informational warning which replaces the list of backend services + // when the list is empty. + Warning *HealthCheckServicesScopedListWarning `json:"warning,omitempty"` + // ForceSendFields is a list of field names (e.g. "Resources") 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. "Resources") 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 HealthCheckServicesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServicesScopedList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// HealthCheckServicesScopedListWarning: Informational warning which replaces +// the list of backend services when the list is empty. +type HealthCheckServicesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*HealthCheckServicesScopedListWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 HealthCheckServicesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServicesScopedListWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type HealthCheckServicesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 HealthCheckServicesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthCheckServicesScopedListWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type HealthChecksAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + // Items: A list of HealthChecksScopedList resources. + Items map[string]HealthChecksScopedList `json:"items,omitempty"` + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will have their + // own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *HealthChecksAggregatedListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 HealthChecksAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksAggregatedList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// HealthChecksAggregatedListWarning: [Output Only] Informational warning +// message. +type HealthChecksAggregatedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*HealthChecksAggregatedListWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 HealthChecksAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksAggregatedListWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type HealthChecksAggregatedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 HealthChecksAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksAggregatedListWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type HealthChecksScopedList struct { + // HealthChecks: A list of HealthChecks contained in this scope. + HealthChecks []*HealthCheck `json:"healthChecks,omitempty"` + // Warning: Informational warning which replaces the list of backend services + // when the list is empty. + Warning *HealthChecksScopedListWarning `json:"warning,omitempty"` + // ForceSendFields is a list of field names (e.g. "HealthChecks") 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. "HealthChecks") 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 HealthChecksScopedList) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksScopedList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// HealthChecksScopedListWarning: Informational warning which replaces the list +// of backend services when the list is empty. +type HealthChecksScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*HealthChecksScopedListWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 HealthChecksScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksScopedListWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type HealthChecksScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 HealthChecksScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthChecksScopedListWarningData return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// HealthCheckServiceReference: A full or valid partial URL to a health check -// service. For example, the following are valid URLs: - -// https://www.googleapis.com/compute/beta/projects/project-id/regions/us-west1/healthCheckServices/health-check-service -// - -// projects/project-id/regions/us-west1/healthCheckServices/health-check-service -// - regions/us-west1/healthCheckServices/health-check-service -type HealthCheckServiceReference struct { - HealthCheckService string `json:"healthCheckService,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheckService") to +// HealthSource: Represents a health source. A health source resource specifies +// the source resources and the health aggregation policy applied to the source +// resources to determine the aggregated health status. +type HealthSource struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + // Description: An optional description of this resource. Provide this property + // when you create the resource. + Description string `json:"description,omitempty"` + // Fingerprint: Fingerprint of this resource. A hash of the contents stored in + // this object. This field is used in optimistic locking. This field will be + // ignored when inserting a HealthSource. An up-to-date fingerprint must be + // provided in order to patch the HealthSource; Otherwise, the request will + // fail with error 412 conditionNotMet. To see the latest fingerprint, make a + // get() request to retrieve the HealthSource. + Fingerprint string `json:"fingerprint,omitempty"` + // HealthAggregationPolicy: URL to the HealthAggregationPolicy resource. Must + // be set. Must be regional and in the same region as the HealthSource. Can be + // mutated. + HealthAggregationPolicy string `json:"healthAggregationPolicy,omitempty"` + // Id: [Output Only] A unique identifier for this resource type. The server + // generates this identifier. + Id uint64 `json:"id,omitempty,string"` + // Kind: [Output Only] Type of the resource. Always compute#healthSource for + // health sources. + Kind string `json:"kind,omitempty"` + // Name: Name of the resource. Provided by the client when the resource is + // created. The name must be 1-63 characters long, and comply with RFC1035. + // Specifically, the name must be 1-63 characters long and match the regular + // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must + // be a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot be a + // dash. + Name string `json:"name,omitempty"` + // Region: [Output Only] URL of the region where the health source resides. + // This field applies only to the regional resource. You must specify this + // field as part of the HTTP request URL. It is not settable as a field in the + // request body. + Region string `json:"region,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL with id for the resource. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // SourceType: Specifies the type of the HealthSource. The only allowed value + // is BACKEND_SERVICE. Must be specified when the HealthSource is created, and + // cannot be mutated. + // + // Possible values: + // "BACKEND_SERVICE" + SourceType string `json:"sourceType,omitempty"` + // Sources: URLs to the source resources. Must be size 1. Must be a + // BackendService if the sourceType is BACKEND_SERVICE. The BackendService must + // have load balancing scheme INTERNAL or INTERNAL_MANAGED and must be regional + // and in the same region as the HealthSource (cross-region deployment for + // INTERNAL_MANAGED is not supported). The BackendService may use only IGs, + // MIGs, or NEGs of type GCE_VM_IP or GCE_VM_IP_PORT. The BackendService may + // not use haPolicy. Can be mutated. + Sources []string `json:"sources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") 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. "HealthCheckService") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "CreationTimestamp") 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 HealthCheckServiceReference) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServiceReference +func (s HealthSource) MarshalJSON() ([]byte, error) { + type NoMethod HealthSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type HealthCheckServicesList struct { +// HealthSourceAggregatedList: Contains a list of HealthSourcesScopedList. +type HealthSourceAggregatedList struct { + Etag string `json:"etag,omitempty"` // Id: [Output Only] Unique identifier for the resource; defined by the server. Id string `json:"id,omitempty"` - // Items: A list of HealthCheckService resources. - Items []*HealthCheckService `json:"items,omitempty"` - // Kind: [Output Only] Type of the resource. Always - // compute#healthCheckServicesList for lists of HealthCheckServices. + // Items: A list of HealthSourcesScopedList resources. + Items map[string]HealthSourcesScopedList `json:"items,omitempty"` + // Kind: Type of resource. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next page of // results for list requests. If the number of results is larger than @@ -17154,172 +17952,34 @@ type HealthCheckServicesList struct { NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *HealthCheckServicesListWarning `json:"warning,omitempty"` + Warning *HealthSourceAggregatedListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 HealthCheckServicesList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckServicesListWarning: [Output Only] Informational warning message. -type HealthCheckServicesListWarning struct { - // Code: [Output Only] A warning code, if applicable. For example, Compute - // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. - // - // Possible values: - // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made - // by a failed operation. - // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. - // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources - // has a type marked as deprecated - // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is - // larger than image size. - // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the - // resources has a type marked as experimental - // "EXTERNAL_API_WARNING" - Warning that is present in an external api call - // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been - // overridden. Deprecated unused field. - // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected - // kernel, which is deprecated. - // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend - // service is associated with a health check that is not of type - // HTTP/HTTPS/HTTP2. - // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a - // exceedingly large number of resources - // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list - // overhead quota exceed which captures the amount of resources filtered out by - // user-defined list filter. - // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type - // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not - // assigned to an instance on the network. - // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip - // forward. - // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance - // URL refers to an instance that does not have an ipv6 interface on the same - // network as the route. - // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to - // an instance that does not exist. - // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL - // refers to an instance that is not on the same network as the route. - // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a - // status of RUNNING. - // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue - // the process despite the mentioned error. - // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. - // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing - // due to errors - // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client - // requests (e.g: regions.list). - // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that - // requires a TOS they have not accepted. - // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is - // in use. - // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete - // could not be deleted because they were in use. - // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is - // ignored. - // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance - // group manager is valid as such, but its application does not make a lot of - // sense, because it allows only single instance in instance group. - // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are - // present - // "UNREACHABLE" - A given scope cannot be reached. - Code string `json:"code,omitempty"` - // Data: [Output Only] Metadata about this warning in key: value format. For - // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*HealthCheckServicesListWarningData `json:"data,omitempty"` - // Message: [Output Only] A human-readable description of the warning code. - Message string `json:"message,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 HealthCheckServicesListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type HealthCheckServicesListWarningData struct { - // Key: [Output Only] A key that provides more detail on the warning being - // returned. For example, for warnings where there are no results in a list - // request for a particular zone, this key might be scope and the key value - // might be the zone name. Other examples might be a key indicating a - // deprecated resource and a suggested replacement, or a warning about invalid - // network settings (for example, if an instance attempts to perform IP - // forwarding but is not enabled for IP forwarding). - Key string `json:"key,omitempty"` - // Value: [Output Only] A warning data value corresponding to the key. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Key") to include in API requests + // NullFields is a list of field names (e.g. "Etag") 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 HealthCheckServicesListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesListWarningData +func (s HealthSourceAggregatedList) MarshalJSON() ([]byte, error) { + type NoMethod HealthSourceAggregatedList return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type HealthCheckServicesScopedList struct { - // Resources: A list of HealthCheckServices contained in this scope. - Resources []*HealthCheckService `json:"resources,omitempty"` - // Warning: Informational warning which replaces the list of backend services - // when the list is empty. - Warning *HealthCheckServicesScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Resources") 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. "Resources") 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 HealthCheckServicesScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesScopedList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// HealthCheckServicesScopedListWarning: Informational warning which replaces -// the list of backend services when the list is empty. -type HealthCheckServicesScopedListWarning struct { +// HealthSourceAggregatedListWarning: [Output Only] Informational warning +// message. +type HealthSourceAggregatedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, Compute // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. // @@ -17384,7 +18044,7 @@ type HealthCheckServicesScopedListWarning struct { Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. For // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*HealthCheckServicesScopedListWarningData `json:"data,omitempty"` + Data []*HealthSourceAggregatedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning code. Message string `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Code") to unconditionally @@ -17400,12 +18060,12 @@ type HealthCheckServicesScopedListWarning struct { NullFields []string `json:"-"` } -func (s HealthCheckServicesScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesScopedListWarning +func (s HealthSourceAggregatedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthSourceAggregatedListWarning return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type HealthCheckServicesScopedListWarningData struct { +type HealthSourceAggregatedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning being // returned. For example, for warnings where there are no results in a list // request for a particular zone, this key might be scope and the key value @@ -17429,17 +18089,19 @@ type HealthCheckServicesScopedListWarningData struct { NullFields []string `json:"-"` } -func (s HealthCheckServicesScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthCheckServicesScopedListWarningData +func (s HealthSourceAggregatedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthSourceAggregatedListWarningData return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type HealthChecksAggregatedList struct { +type HealthSourceList struct { + Etag string `json:"etag,omitempty"` // Id: [Output Only] Unique identifier for the resource; defined by the server. Id string `json:"id,omitempty"` - // Items: A list of HealthChecksScopedList resources. - Items map[string]HealthChecksScopedList `json:"items,omitempty"` - // Kind: Type of resource. + // Items: A list of HealthSource resources. + Items []*HealthSource `json:"items,omitempty"` + // Kind: [Output Only] Type of the resource. Always compute#healthSource for + // health sources. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next page of // results for list requests. If the number of results is larger than @@ -17449,34 +18111,34 @@ type HealthChecksAggregatedList struct { NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // Unreachables: [Output Only] Unreachable resources. + // Unreachables: [Output Only] Unreachable resources. end_interface: + // MixerListResponseWithEtagBuilder Unreachables []string `json:"unreachables,omitempty"` // Warning: [Output Only] Informational warning message. - Warning *HealthChecksAggregatedListWarning `json:"warning,omitempty"` + Warning *HealthSourceListWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Id") to include in API requests + // NullFields is a list of field names (e.g. "Etag") 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 HealthChecksAggregatedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedList +func (s HealthSourceList) MarshalJSON() ([]byte, error) { + type NoMethod HealthSourceList return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// HealthChecksAggregatedListWarning: [Output Only] Informational warning -// message. -type HealthChecksAggregatedListWarning struct { +// HealthSourceListWarning: [Output Only] Informational warning message. +type HealthSourceListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, Compute // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. // @@ -17541,7 +18203,7 @@ type HealthChecksAggregatedListWarning struct { Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. For // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*HealthChecksAggregatedListWarningData `json:"data,omitempty"` + Data []*HealthSourceListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning code. Message string `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Code") to unconditionally @@ -17557,12 +18219,12 @@ type HealthChecksAggregatedListWarning struct { NullFields []string `json:"-"` } -func (s HealthChecksAggregatedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedListWarning +func (s HealthSourceListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthSourceListWarning return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type HealthChecksAggregatedListWarningData struct { +type HealthSourceListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning being // returned. For example, for warnings where there are no results in a list // request for a particular zone, this key might be scope and the key value @@ -17586,38 +18248,38 @@ type HealthChecksAggregatedListWarningData struct { NullFields []string `json:"-"` } -func (s HealthChecksAggregatedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksAggregatedListWarningData +func (s HealthSourceListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthSourceListWarningData return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type HealthChecksScopedList struct { - // HealthChecks: A list of HealthChecks contained in this scope. - HealthChecks []*HealthCheck `json:"healthChecks,omitempty"` - // Warning: Informational warning which replaces the list of backend services +type HealthSourcesScopedList struct { + // Resources: A list of HealthSources contained in this scope. + Resources []*HealthSource `json:"resources,omitempty"` + // Warning: Informational warning which replaces the list of health sources // when the list is empty. - Warning *HealthChecksScopedListWarning `json:"warning,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthChecks") to + Warning *HealthSourcesScopedListWarning `json:"warning,omitempty"` + // ForceSendFields is a list of field names (e.g. "Resources") 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. "HealthChecks") to include in API + // NullFields is a list of field names (e.g. "Resources") 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 HealthChecksScopedList) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedList +func (s HealthSourcesScopedList) MarshalJSON() ([]byte, error) { + type NoMethod HealthSourcesScopedList return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// HealthChecksScopedListWarning: Informational warning which replaces the list -// of backend services when the list is empty. -type HealthChecksScopedListWarning struct { +// HealthSourcesScopedListWarning: Informational warning which replaces the +// list of health sources when the list is empty. +type HealthSourcesScopedListWarning struct { // Code: [Output Only] A warning code, if applicable. For example, Compute // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. // @@ -17682,7 +18344,7 @@ type HealthChecksScopedListWarning struct { Code string `json:"code,omitempty"` // Data: [Output Only] Metadata about this warning in key: value format. For // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } - Data []*HealthChecksScopedListWarningData `json:"data,omitempty"` + Data []*HealthSourcesScopedListWarningData `json:"data,omitempty"` // Message: [Output Only] A human-readable description of the warning code. Message string `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Code") to unconditionally @@ -17698,12 +18360,12 @@ type HealthChecksScopedListWarning struct { NullFields []string `json:"-"` } -func (s HealthChecksScopedListWarning) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedListWarning +func (s HealthSourcesScopedListWarning) MarshalJSON() ([]byte, error) { + type NoMethod HealthSourcesScopedListWarning return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type HealthChecksScopedListWarningData struct { +type HealthSourcesScopedListWarningData struct { // Key: [Output Only] A key that provides more detail on the warning being // returned. For example, for warnings where there are no results in a list // request for a particular zone, this key might be scope and the key value @@ -17727,8 +18389,8 @@ type HealthChecksScopedListWarningData struct { NullFields []string `json:"-"` } -func (s HealthChecksScopedListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod HealthChecksScopedListWarningData +func (s HealthSourcesScopedListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod HealthSourcesScopedListWarningData return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -24998,8 +25660,16 @@ type InstancesReportHostAsFaultyRequest struct { // "DIAGNOSE_AND_REPAIR" - The action hint to diagnose and repair the host. // "EXECUTE_ALL_RECOMMENDED_SCANS" - The action hint to execute recommended // scans without sending the machine through hwops. - ActionHint string `json:"actionHint,omitempty"` - FaultReasons []*InstancesReportHostAsFaultyRequestFaultReason `json:"faultReasons,omitempty"` + ActionHint string `json:"actionHint,omitempty"` + // DisruptionSchedule: The disruption schedule for the VM. Default to + // IMMEDIATE. + // + // Possible values: + // "DISRUPTION_SCHEDULE_UNSPECIFIED" - Not used. Required as per aip/126. + // "FUTURE" - Delay disruption for caller control. Will be default soon. + // "IMMEDIATE" - Default value. Disrupt the VM immediately. + DisruptionSchedule string `json:"disruptionSchedule,omitempty"` + FaultReasons []*InstancesReportHostAsFaultyRequestFaultReason `json:"faultReasons,omitempty"` // ForceSendFields is a list of field names (e.g. "ActionHint") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -27362,6 +28032,280 @@ func (s InterconnectAttachmentGroupLogicalStructureRegionMetroFacilityZone) Mars return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type InterconnectAttachmentGroupsCreateMembers struct { + // Attachments: Parameters for the specific Attachments to create. + Attachments []*InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput `json:"attachments,omitempty"` + // IntentMismatchBehavior: How to behave when + // configured.availabilitySLA.effectiveSLA would not equal + // intent.availabilitySLA after this call. + // + // Possible values: + // "CREATE" + // "REJECT" + // "UNSPECIFIED" + IntentMismatchBehavior string `json:"intentMismatchBehavior,omitempty"` + // TemplateAttachment: Default parameters for the Attachments to create in this + // call. + TemplateAttachment *InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput `json:"templateAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. "Attachments") 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. "Attachments") 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 InterconnectAttachmentGroupsCreateMembers) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentGroupsCreateMembers + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput: +// LINT.IfChange Parameters used to create an InterconnectAttachment. This is +// similar to InterconnectAttachment, but the region field used here is not +// output only and all other output only fields are excluded. +type InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput struct { + // AdminEnabled: Determines whether this Attachment will carry packets. Not + // present for PARTNER_PROVIDER. + AdminEnabled bool `json:"adminEnabled,omitempty"` + // Bandwidth: Provisioned bandwidth capacity for the interconnect attachment. + // For attachments of type DEDICATED, the user can set the bandwidth. For + // attachments of type PARTNER, the Google Partner that is operating the + // interconnect must set the bandwidth. Output only for PARTNER type, mutable + // for PARTNER_PROVIDER and DEDICATED, and can take one of the following + // values: - BPS_50M: 50 Mbit/s - BPS_100M: 100 Mbit/s - BPS_200M: 200 Mbit/s - + // BPS_300M: 300 Mbit/s - BPS_400M: 400 Mbit/s - BPS_500M: 500 Mbit/s - BPS_1G: + // 1 Gbit/s - BPS_2G: 2 Gbit/s - BPS_5G: 5 Gbit/s - BPS_10G: 10 Gbit/s - + // BPS_20G: 20 Gbit/s - BPS_50G: 50 Gbit/s - BPS_100G: 100 Gbit/s + // + // Possible values: + // "BPS_100G" - 100 Gbit/s + // "BPS_100M" - 100 Mbit/s + // "BPS_10G" - 10 Gbit/s + // "BPS_1G" - 1 Gbit/s + // "BPS_200M" - 200 Mbit/s + // "BPS_20G" - 20 Gbit/s + // "BPS_2G" - 2 Gbit/s + // "BPS_300M" - 300 Mbit/s + // "BPS_400M" - 400 Mbit/s + // "BPS_500M" - 500 Mbit/s + // "BPS_50G" - 50 Gbit/s + // "BPS_50M" - 50 Mbit/s + // "BPS_5G" - 5 Gbit/s + Bandwidth string `json:"bandwidth,omitempty"` + // CandidateCloudRouterIpAddress: Single IPv4 address + prefix length to be + // configured on the cloud router interface for this interconnect attachment. - + // Both candidate_cloud_router_ip_address and + // candidate_customer_router_ip_address fields must be set or both must be + // unset. - Prefix length of both candidate_cloud_router_ip_address and + // candidate_customer_router_ip_address must be the same. - Max prefix length + // is 31. + CandidateCloudRouterIpAddress string `json:"candidateCloudRouterIpAddress,omitempty"` + // CandidateCloudRouterIpv6Address: Single IPv6 address + prefix length to be + // configured on the cloud router interface for this interconnect attachment. - + // Both candidate_cloud_router_ipv6_address and + // candidate_customer_router_ipv6_address fields must be set or both must be + // unset. - Prefix length of both candidate_cloud_router_ipv6_address and + // candidate_customer_router_ipv6_address must be the same. - Max prefix length + // is 126. + CandidateCloudRouterIpv6Address string `json:"candidateCloudRouterIpv6Address,omitempty"` + // CandidateCustomerRouterIpAddress: Single IPv4 address + prefix length to be + // configured on the customer router interface for this interconnect + // attachment. + CandidateCustomerRouterIpAddress string `json:"candidateCustomerRouterIpAddress,omitempty"` + // CandidateCustomerRouterIpv6Address: Single IPv6 address + prefix length to + // be configured on the customer router interface for this interconnect + // attachment. + CandidateCustomerRouterIpv6Address string `json:"candidateCustomerRouterIpv6Address,omitempty"` + // CandidateIpv6Subnets: This field is not available. + CandidateIpv6Subnets []string `json:"candidateIpv6Subnets,omitempty"` + // CandidateSubnets: Input only. Up to 16 candidate prefixes that can be used + // to restrict the allocation of cloudRouterIpAddress and + // customerRouterIpAddress for this attachment. All prefixes must be within + // link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, + // /27, etc). Google will attempt to select an unused /29 from the supplied + // candidate prefix(es). The request will fail if all possible /29s are in use + // on Google's edge. If not supplied, Google will randomly select an unused /29 + // from all of link-local space. + CandidateSubnets []string `json:"candidateSubnets,omitempty"` + // CloudRouterIpv6InterfaceId: This field is not available. + CloudRouterIpv6InterfaceId string `json:"cloudRouterIpv6InterfaceId,omitempty"` + // CustomerRouterIpv6InterfaceId: This field is not available. + CustomerRouterIpv6InterfaceId string `json:"customerRouterIpv6InterfaceId,omitempty"` + // Description: An optional description of this resource. + Description string `json:"description,omitempty"` + // EdgeAvailabilityDomain: Input only. Desired availability domain for the + // attachment. Only available for type PARTNER, at creation time, and can take + // one of the following values: - AVAILABILITY_DOMAIN_ANY - + // AVAILABILITY_DOMAIN_1 - AVAILABILITY_DOMAIN_2 For improved reliability, + // customers should configure a pair of attachments, one per availability + // domain. The selected availability domain will be provided to the Partner via + // the pairing key, so that the provisioned circuit will lie in the specified + // domain. If not specified, the value will default to AVAILABILITY_DOMAIN_ANY. + // + // Possible values: + // "AVAILABILITY_DOMAIN_1" + // "AVAILABILITY_DOMAIN_2" + // "AVAILABILITY_DOMAIN_ANY" + EdgeAvailabilityDomain string `json:"edgeAvailabilityDomain,omitempty"` + // Encryption: Indicates the user-supplied encryption option of this VLAN + // attachment (interconnectAttachment). Can only be specified at attachment + // creation for PARTNER or DEDICATED attachments. Possible values are: - alpha + // - This is the default value, which means that the VLAN attachment carries + // unencrypted traffic. VMs are able to send traffic to, or receive traffic + // from, such a VLAN attachment. - IPSEC - The VLAN attachment carries only + // encrypted traffic that is encrypted by an IPsec device, such as an HA VPN + // gateway or third-party IPsec VPN. VMs cannot directly send traffic to, or + // receive traffic from, such a VLAN attachment. To use *HA VPN over Cloud + // Interconnect*, the VLAN attachment must be created with this option. + // + // Possible values: + // "IPSEC" - The interconnect attachment will carry only encrypted traffic + // that is encrypted by an IPsec device such as HA VPN gateway; VMs cannot + // directly send traffic to or receive traffic from such an interconnect + // attachment. To use HA VPN over Cloud Interconnect, the interconnect + // attachment must be created with this option. + // "NONE" - This is the default value, which means the Interconnect + // Attachment will carry unencrypted traffic. VMs will be able to send traffic + // to or receive traffic from such interconnect attachment. + Encryption string `json:"encryption,omitempty"` + // Interconnect: URL of the underlying Interconnect object that this + // attachment's traffic will traverse through. + Interconnect string `json:"interconnect,omitempty"` + // IpsecInternalAddresses: A list of URLs of addresses that have been reserved + // for the VLAN attachment. Used only for the VLAN attachment that has the + // encryption option as IPSEC. The addresses must be regional internal IP + // address ranges. When creating an HA VPN gateway over the VLAN attachment, if + // the attachment is configured to use a regional internal IP address, then the + // VPN gateway's IP address is allocated from the IP address range specified + // here. For example, if the HA VPN gateway's interface 0 is paired to this + // VLAN attachment, then a regional internal IP address for the VPN gateway + // interface 0 will be allocated from the IP address specified for this VLAN + // attachment. If this field is not specified when creating the VLAN + // attachment, then later on when creating an HA VPN gateway on this VLAN + // attachment, the HA VPN gateway's IP address is allocated from the regional + // external IP address pool. + IpsecInternalAddresses []string `json:"ipsecInternalAddresses,omitempty"` + // L2Forwarding: L2 Interconnect Attachment related config. This field is + // required if the type is L2_DEDICATED. The configuration specifies how VLAN + // tags (like dot1q, qinq, or dot1ad) within L2 packets are mapped to the + // destination appliances IP addresses. The packet is then encapsulated with + // the appliance IP address and sent to the edge appliance. + L2Forwarding *InterconnectAttachmentL2Forwarding `json:"l2Forwarding,omitempty"` + // Mtu: Maximum Transmission Unit (MTU), in bytes, of packets passing through + // this interconnect attachment. Only 1440 and 1500 are allowed. If not + // specified, the value will default to 1440. + Mtu int64 `json:"mtu,omitempty"` + // MulticastEnabled: Whether or not to permit multicast traffic for this + // attachment. Multicast packets will be dropped if this is not enabled. + MulticastEnabled bool `json:"multicastEnabled,omitempty"` + // Name: Name of the resource. Provided by the client when the resource is + // created. The name must be 1-63 characters long, and comply with RFC1035. + // Specifically, the name must be 1-63 characters long and match the regular + // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must + // be a lowercase letter, and all following characters must be a dash, + // lowercase letter, or digit, except the last character, which cannot be a + // dash. + Name string `json:"name,omitempty"` + // PairingKey: [Output only for type PARTNER. Input only for PARTNER_PROVIDER. + // Not present for DEDICATED]. The opaque identifier of a PARTNER attachment + // used to initiate provisioning with a selected partner. Of the form + // "XXXXX/region/domain" + PairingKey string `json:"pairingKey,omitempty"` + // PartnerAsn: Optional BGP ASN for the router supplied by a Layer 3 Partner if + // they configured BGP on behalf of the customer. Output only for PARTNER type, + // input only for PARTNER_PROVIDER, not available for DEDICATED. + PartnerAsn int64 `json:"partnerAsn,omitempty,string"` + // PartnerMetadata: Informational metadata about Partner attachments from + // Partners to display to customers. Output only for PARTNER type, mutable for + // PARTNER_PROVIDER, not available for DEDICATED. + PartnerMetadata *InterconnectAttachmentPartnerMetadata `json:"partnerMetadata,omitempty"` + // Region: The region that the Attachment is in. + Region string `json:"region,omitempty"` + // Router: URL of the Cloud Router to be used for dynamic routing. This router + // must be in the same region as this InterconnectAttachment. The + // InterconnectAttachment will automatically connect the Interconnect to the + // network & region within which the Cloud Router is configured. + Router string `json:"router,omitempty"` + // StackType: The stack type for this interconnect attachment to identify + // whether the IPv6 feature is enabled or not. If not specified, IPV4_ONLY will + // be used. This field can be both set at interconnect attachments creation and + // update interconnect attachment operations. + // + // Possible values: + // "IPV4_IPV6" - The interconnect attachment can have both IPv4 and IPv6 + // addresses. + // "IPV4_ONLY" - The interconnect attachment will only be assigned IPv4 + // addresses. + StackType string `json:"stackType,omitempty"` + // SubnetLength: Input only. Length of the IPv4 subnet mask. Allowed values: - + // 29 (default) - 30 The default value is 29, except for Cross-Cloud + // Interconnect connections that use an InterconnectRemoteLocation with a + // constraints.subnetLengthRange.min equal to 30. For example, connections that + // use an Azure remote location fall into this category. In these cases, the + // default value is 30, and requesting 29 returns an error. Where both 29 and + // 30 are allowed, 29 is preferred, because it gives Google Cloud Support more + // debugging visibility. + SubnetLength int64 `json:"subnetLength,omitempty"` + // Type: The type of interconnect attachment this is, which can take one of the + // following values: - DEDICATED: an attachment to a Dedicated Interconnect. - + // PARTNER: an attachment to a Partner Interconnect, created by the customer. - + // PARTNER_PROVIDER: an attachment to a Partner Interconnect, created by the + // partner. + // + // Possible values: + // "DEDICATED" - Attachment to a dedicated interconnect. + // "L2_DEDICATED" - Attachment to a L2 interconnect, created by the customer. + // "PARTNER" - Attachment to a partner interconnect, created by the customer. + // "PARTNER_PROVIDER" - Attachment to a partner interconnect, created by the + // partner. + Type string `json:"type,omitempty"` + // VlanTag8021q: The IEEE 802.1Q VLAN tag for this attachment, in the range + // 2-4093. Only specified at creation time. + VlanTag8021q int64 `json:"vlanTag8021q,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdminEnabled") 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. "AdminEnabled") 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 InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentGroupsCreateMembersInterconnectAttachmentInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type InterconnectAttachmentGroupsCreateMembersRequest struct { + Request *InterconnectAttachmentGroupsCreateMembers `json:"request,omitempty"` + // ForceSendFields is a list of field names (e.g. "Request") 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. "Request") 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 InterconnectAttachmentGroupsCreateMembersRequest) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachmentGroupsCreateMembersRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // InterconnectAttachmentGroupsGetOperationalStatusResponse: Response for the // InterconnectAttachmentGroupsGetOperationalStatusResponse. type InterconnectAttachmentGroupsGetOperationalStatusResponse struct { @@ -28855,32 +29799,6 @@ func (s InterconnectGroupsCreateMembersRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// InterconnectGroupsCreateMembersResponse: Response for the -// InterconnectGroupsCreateMembersRequest. -type InterconnectGroupsCreateMembersResponse struct { - Etag string `json:"etag,omitempty"` - Result *InterconnectGroup `json:"result,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 InterconnectGroupsCreateMembersResponse) MarshalJSON() ([]byte, error) { - type NoMethod InterconnectGroupsCreateMembersResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // InterconnectGroupsGetOperationalStatusResponse: Response for the // InterconnectGroupsGetOperationalStatusResponse. type InterconnectGroupsGetOperationalStatusResponse struct { @@ -29348,9 +30266,10 @@ type InterconnectLocation struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // CrossSiteInterconnectInfos: [Output Only] A list of - // InterconnectLocation.CrossSiteInterconnectInfo objects, that describe - // parameters pertaining to the relation between this InterconnectLocation and - // various Interconnect metros. + // InterconnectLocation.CrossSiteInterconnectInfo objects, that describe where + // Cross-Site Interconnect wires may connect to from this location and + // associated connection parameters. Cross-Site Interconnect isn't allowed to + // locations which are not listed. CrossSiteInterconnectInfos []*InterconnectLocationCrossSiteInterconnectInfo `json:"crossSiteInterconnectInfos,omitempty"` // Description: [Output Only] An optional description of the resource. Description string `json:"description,omitempty"` @@ -29414,11 +30333,13 @@ func (s InterconnectLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// InterconnectLocationCrossSiteInterconnectInfo: Information about any -// potential WireGroups between an Interconnect at a specific -// InterconnectLocation, and an Interconnect in another metro. +// InterconnectLocationCrossSiteInterconnectInfo: Information about Cross-Site +// Interconnect wires which may be created between the containing location and +// another remote location. type InterconnectLocationCrossSiteInterconnectInfo struct { - // City: Metropolitan area designator + // City: The remote location for Cross-Site Interconnect wires. This specifies + // an InterconnectLocation city (metropolitan area designator), which itself + // may match multiple InterconnectLocations. City string `json:"city,omitempty"` // MaxSingleFlowGbps: The maximum gbps for a single flow to this metro. This // limits the total bandwidth which may be configured per wire. @@ -32536,6 +33457,8 @@ type ManagedInstanceInstanceFlexibilityOverride struct { // ProvisioningModel: The provisioning model to be used for this instance. // // Possible values: + // "FLEX_START" - Instance is provisioned with DWS Flex Start and have + // limited max run duration. // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which // it is provisioned. // "SPOT" - Heavily discounted, no guaranteed runtime. @@ -32716,6 +33639,8 @@ type ManagedInstancePropertiesFromFlexibilityPolicy struct { // ProvisioningModel: The provisioning model to be used for this instance. // // Possible values: + // "FLEX_START" - Instance is provisioned with DWS Flex Start and have + // limited max run duration. // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which // it is provisioned. // "SPOT" - Heavily discounted, no guaranteed runtime. @@ -33016,6 +33941,229 @@ func (s MultiMig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MultiMigMember: Represents a Multi-MIG member resource. +type MultiMigMember struct { + // CreationTimestamp: [Output Only] Creation timestamp of this multi-MIG member + // in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + // Description: An optional description of this resource. + Description string `json:"description,omitempty"` + // Id: [Output only] The unique identifier for this resource type. The server + // generates this identifier. + Id uint64 `json:"id,omitempty,string"` + // Kind: Type of the resource. Always compute#multiMigMember for a list of + // multi-MIG members. + Kind string `json:"kind,omitempty"` + // Name: [Output Only] The name of this multi-MIG member generated by Google + // Compute Engine. + Name string `json:"name,omitempty"` + // Region: [Output Only] The URL of the region where the multi-MIG resides. + Region string `json:"region,omitempty"` + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // Status: [Output Only] The status of this multi-MIG member + Status *MultiMigMemberStatus `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") 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. "CreationTimestamp") 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 MultiMigMember) MarshalJSON() ([]byte, error) { + type NoMethod MultiMigMember + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type MultiMigMemberList struct { + // Id: Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + // Items: A list of multi-MIG member resources. + Items []*MultiMigMember `json:"items,omitempty"` + // Kind: Type of the resource. Always compute#multiMigMember for a list of + // multi-MIG members. + Kind string `json:"kind,omitempty"` + // NextPageToken: This token allows you to get the next page of results for + // list requests. If the number of results is larger than maxResults, use the + // nextPageToken as a value for the query parameter pageToken in the next list + // request. Subsequent list requests will have their own nextPageToken to + // continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Warning: Informational warning message. + Warning *MultiMigMemberListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 MultiMigMemberList) MarshalJSON() ([]byte, error) { + type NoMethod MultiMigMemberList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MultiMigMemberListWarning: Informational warning message. +type MultiMigMemberListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*MultiMigMemberListWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 MultiMigMemberListWarning) MarshalJSON() ([]byte, error) { + type NoMethod MultiMigMemberListWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type MultiMigMemberListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 MultiMigMemberListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod MultiMigMemberListWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type MultiMigMemberStatus struct { + // InstanceGroupManager: [Output Only] URL of member instance group manager + InstanceGroupManager string `json:"instanceGroupManager,omitempty"` + // ForceSendFields is a list of field names (e.g. "InstanceGroupManager") 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. "InstanceGroupManager") 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 MultiMigMemberStatus) MarshalJSON() ([]byte, error) { + type NoMethod MultiMigMemberStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MultiMigResourcePolicies: Resource policies message for a multi-MIG. // Specifies the workload policy configuration of the multi-MIG. type MultiMigResourcePolicies struct { @@ -34498,11 +35646,6 @@ type NetworkEndpoint struct { // defaultPort for the network endpoint group will be used. This field can not // be set for network endpoints of type GCE_VM_IP. Port int64 `json:"port,omitempty"` - // Zone: The name of the zone where the instance hosting the network endpoint - // is located (valid only for regional GCE_VM_IP_PORT NEGs). It should comply - // with RFC1035. The zone must belong to the region of the Network Endpoint - // Group. - Zone string `json:"zone,omitempty"` // ForceSendFields is a list of field names (e.g. "Annotations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -49860,13 +51003,11 @@ type RouterBgpPeer struct { EnableIpv6 bool `json:"enableIpv6,omitempty"` // ExportPolicies: List of export policies applied to this peer, in the order // they must be evaluated. The name must correspond to an existing policy that - // has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently - // available in preview. Please use Beta API to use Route Policies. + // has ROUTE_POLICY_TYPE_EXPORT type. ExportPolicies []string `json:"exportPolicies,omitempty"` // ImportPolicies: List of import policies applied to this peer, in the order // they must be evaluated. The name must correspond to an existing policy that - // has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently - // available in preview. Please use Beta API to use Route Policies. + // has ROUTE_POLICY_TYPE_IMPORT type. ImportPolicies []string `json:"importPolicies,omitempty"` // InterfaceName: Name of the interface the BGP peer is associated with. InterfaceName string `json:"interfaceName,omitempty"` @@ -50666,6 +51807,8 @@ type RouterStatus struct { BestRoutesForRouter []*Route `json:"bestRoutesForRouter,omitempty"` BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"` NatStatus []*RouterStatusNatStatus `json:"natStatus,omitempty"` + // NccGateway: URI of the ncc_gateway to which this router associated. + NccGateway string `json:"nccGateway,omitempty"` // Network: URI of the network to which this router belongs. Network string `json:"network,omitempty"` // ForceSendFields is a list of field names (e.g. "BestRoutes") to @@ -51914,6 +53057,8 @@ type Scheduling struct { // ProvisioningModel: Specifies the provisioning model of the instance. // // Possible values: + // "FLEX_START" - Instance is provisioned with DWS Flex Start and have + // limited max run duration. // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which // it is provisioned. // "SPOT" - Heavily discounted, no guaranteed runtime. @@ -55427,10 +56572,10 @@ type Snapshot struct { SourceInstantSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceInstantSnapshotEncryptionKey,omitempty"` // SourceInstantSnapshotId: [Output Only] The unique ID of the instant snapshot // used to create this snapshot. This value identifies the exact instant - // snapshot that was used to create this persistent disk. For example, if you - // created the persistent disk from an instant snapshot that was later deleted - // and recreated under the same name, the source instant snapshot ID would - // identify the exact instant snapshot that was used. + // snapshot that was used to create this snapshot. For example, if you created + // the snapshot from an instant snapshot that was later deleted and recreated + // under the same name, the source instant snapshot ID would identify the exact + // instant snapshot that was used. SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` // SourceSnapshotSchedulePolicy: [Output Only] URL of the resource policy which // created this scheduled snapshot. @@ -59296,15 +60441,17 @@ type Subnetwork struct { // VMs in this subnet to Google services. PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or - // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created - // subnets or subnets that are automatically created in auto mode networks. - // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY - // are user-created subnetworks that are reserved for Envoy-based load - // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to - // publish services using Private Service Connect. A subnet with purpose set to - // PEER_MIGRATION is used for subnet migration from one peered VPC to another. - // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION, + // PRIVATE_SERVICE_CONNECT or PRIVATE_NAT. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in auto mode + // networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or + // REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for + // Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private Service + // Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet + // migration from one peered VPC to another. A subnet with purpose set to + // PRIVATE_NAT is used for Private NAT IP address by Private NAT Gateway. If + // unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // @@ -65731,15 +66878,17 @@ type UsableSubnetwork struct { // Network: Network URL. Network string `json:"network,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or - // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created - // subnets or subnets that are automatically created in auto mode networks. - // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY - // are user-created subnetworks that are reserved for Envoy-based load - // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to - // publish services using Private Service Connect. A subnet with purpose set to - // PEER_MIGRATION is used for subnet migration from one peered VPC to another. - // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION, + // PRIVATE_SERVICE_CONNECT or PRIVATE_NAT. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in auto mode + // networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or + // REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for + // Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private Service + // Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet + // migration from one peered VPC to another. A subnet with purpose set to + // PRIVATE_NAT is used for Private NAT IP address by Private NAT Gateway. If + // unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // @@ -68013,10 +69162,10 @@ type WireGroupEndpointInterconnect struct { // guidelines: - A VLAN tag must be unique for an Interconnect connection // across all attachments and wire groups. - Both endpoints of a wire must use // the same VLAN tag value. - Single wire and redundant type wire groups must - // have only one VLAN tag. - Box and cross type wire groups must have two VLAN - // tags. The first is for the same-zone pseudowire, and the second is for the - // cross-zone pseudowire. - Port mode pseudowires must configure a value of - // `-1` for both endpoints. + // have only one VLAN tag. - Port mode pseudowires must have a single VLAN tag + // with a value of `-1` for both endpoints. - Box and cross type wire groups + // must have two VLAN tags. The first is for the same-zone pseudowire, and the + // second is for the cross-zone pseudowire. VlanTags []int64 `json:"vlanTags,omitempty"` // ForceSendFields is a list of field names (e.g. "Interconnect") to // unconditionally include in API requests. By default, fields with empty or @@ -68392,7 +69541,7 @@ type WireProperties struct { // transfer is limited by the port speed. BandwidthMetered int64 `json:"bandwidthMetered,omitempty,string"` // BandwidthUnmetered: The unmetered bandwidth in Gigabits per second, using - // decimal units. `10` is 10 Gbps, `100` is 100 Gbps. Must be a multiple of 10. + // decimal units. `10` is 10 Gbps, `100` is 100 Gbps. BandwidthUnmetered int64 `json:"bandwidthUnmetered,omitempty,string"` // FaultResponse: Response when a fault is detected in a pseudowire: - NONE: // default. - DISABLE_PORT: set the port line protocol down when inline probes @@ -68406,8 +69555,8 @@ type WireProperties struct { // NetworkServiceClass: The network service class. // // Possible values: - // "BRONZE" - The default service class. - // "GOLD" - A higher service class. + // "BRONZE" - The lowest service class. + // "GOLD" - The highest service class. NetworkServiceClass string `json:"networkServiceClass,omitempty"` // ForceSendFields is a list of field names (e.g. "BandwidthAllocation") to // unconditionally include in API requests. By default, fields with empty or diff --git a/compute/v0.alpha/compute2-gen.go b/compute/v0.alpha/compute2-gen.go index e34a4563a61..c4e0f778227 100644 --- a/compute/v0.alpha/compute2-gen.go +++ b/compute/v0.alpha/compute2-gen.go @@ -9057,6 +9057,136 @@ func (c *DisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro return ret, nil } +type DisksBulkSetLabelsCall struct { + s *Service + project string + zone string + bulkzonesetlabelsrequest *BulkZoneSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BulkSetLabels: Sets the labels on many disks at once. To learn more about +// labels, read the Labeling Resources documentation. +// +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *DisksService) BulkSetLabels(project string, zone string, bulkzonesetlabelsrequest *BulkZoneSetLabelsRequest) *DisksBulkSetLabelsCall { + c := &DisksBulkSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.bulkzonesetlabelsrequest = bulkzonesetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *DisksBulkSetLabelsCall) RequestId(requestId string) *DisksBulkSetLabelsCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Resource sets the optional parameter "resource": Name or id of the resource +// for this request. +func (c *DisksBulkSetLabelsCall) Resource(resource string) *DisksBulkSetLabelsCall { + c.urlParams_.Set("resource", resource) + 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 *DisksBulkSetLabelsCall) Fields(s ...googleapi.Field) *DisksBulkSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DisksBulkSetLabelsCall) Context(ctx context.Context) *DisksBulkSetLabelsCall { + 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 *DisksBulkSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DisksBulkSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkzonesetlabelsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/disks/bulkSetLabels") + 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{ + "project": c.project, + "zone": c.zone, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.disks.bulkSetLabels", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.disks.bulkSetLabels" 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 *DisksBulkSetLabelsCall) 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", "compute.disks.bulkSetLabels", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type DisksCreateSnapshotCall struct { s *Service project string @@ -44784,6 +44914,115 @@ func (c *InstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption return ret, nil } +type InterconnectAttachmentGroupsCreateMembersCall struct { + s *Service + project string + interconnectAttachmentGroup string + interconnectattachmentgroupscreatemembersrequest *InterconnectAttachmentGroupsCreateMembersRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CreateMembers: Create Interconnect Attachments with redundancy by creating +// them in a specified interconnect attachment group. +// +// - interconnectAttachmentGroup: Name of the group resource to create members +// for. +// - project: Project ID for this request. +func (r *InterconnectAttachmentGroupsService) CreateMembers(project string, interconnectAttachmentGroup string, interconnectattachmentgroupscreatemembersrequest *InterconnectAttachmentGroupsCreateMembersRequest) *InterconnectAttachmentGroupsCreateMembersCall { + c := &InterconnectAttachmentGroupsCreateMembersCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.interconnectAttachmentGroup = interconnectAttachmentGroup + c.interconnectattachmentgroupscreatemembersrequest = interconnectattachmentgroupscreatemembersrequest + 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 *InterconnectAttachmentGroupsCreateMembersCall) Fields(s ...googleapi.Field) *InterconnectAttachmentGroupsCreateMembersCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InterconnectAttachmentGroupsCreateMembersCall) Context(ctx context.Context) *InterconnectAttachmentGroupsCreateMembersCall { + 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 *InterconnectAttachmentGroupsCreateMembersCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectAttachmentGroupsCreateMembersCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.interconnectattachmentgroupscreatemembersrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectAttachmentGroups/{interconnectAttachmentGroup}/createMembers") + 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{ + "project": c.project, + "interconnectAttachmentGroup": c.interconnectAttachmentGroup, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectAttachmentGroups.createMembers", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectAttachmentGroups.createMembers" 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 *InterconnectAttachmentGroupsCreateMembersCall) 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", "compute.interconnectAttachmentGroups.createMembers", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type InterconnectAttachmentGroupsDeleteCall struct { s *Service project string @@ -47425,128 +47664,127 @@ func (c *InterconnectGroupsCreateMembersCall) doRequest(alt string) (*http.Respo // Do executes the "compute.interconnectGroups.createMembers" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectGroupsCreateMembersResponse.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 *InterconnectGroupsCreateMembersCall) Do(opts ...googleapi.CallOption) (*InterconnectGroupsCreateMembersResponse, 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 := &InterconnectGroupsCreateMembersResponse{ - 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", "compute.interconnectGroups.createMembers", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type InterconnectGroupsDeleteCall struct { - s *Service - project string - interconnectGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified InterconnectGroup in the given scope -// -// - interconnectGroup: Name of the InterconnectGroup resource to delete. -// - project: Project ID for this request. -func (r *InterconnectGroupsService) Delete(project string, interconnectGroup string) *InterconnectGroupsDeleteCall { - c := &InterconnectGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnectGroup = interconnectGroup - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). end_interface: -// MixerMutationRequestBuilder -func (c *InterconnectGroupsDeleteCall) RequestId(requestId string) *InterconnectGroupsDeleteCall { - c.urlParams_.Set("requestId", requestId) - 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 *InterconnectGroupsDeleteCall) Fields(s ...googleapi.Field) *InterconnectGroupsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectGroupsDeleteCall) Context(ctx context.Context) *InterconnectGroupsDeleteCall { - 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 *InterconnectGroupsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectGroupsDeleteCall) 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, "projects/{project}/global/interconnectGroups/{interconnectGroup}") - 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{ - "project": c.project, - "interconnectGroup": c.interconnectGroup, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectGroups.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 *InterconnectGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InterconnectGroupsCreateMembersCall) 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", "compute.interconnectGroups.createMembers", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type InterconnectGroupsDeleteCall struct { + s *Service + project string + interconnectGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified InterconnectGroup in the given scope +// +// - interconnectGroup: Name of the InterconnectGroup resource to delete. +// - project: Project ID for this request. +func (r *InterconnectGroupsService) Delete(project string, interconnectGroup string) *InterconnectGroupsDeleteCall { + c := &InterconnectGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.interconnectGroup = interconnectGroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). end_interface: +// MixerMutationRequestBuilder +func (c *InterconnectGroupsDeleteCall) RequestId(requestId string) *InterconnectGroupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *InterconnectGroupsDeleteCall) Fields(s ...googleapi.Field) *InterconnectGroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InterconnectGroupsDeleteCall) Context(ctx context.Context) *InterconnectGroupsDeleteCall { + 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 *InterconnectGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InterconnectGroupsDeleteCall) 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, "projects/{project}/global/interconnectGroups/{interconnectGroup}") + 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{ + "project": c.project, + "interconnectGroup": c.interconnectGroup, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.interconnectGroups.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.interconnectGroups.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 *InterconnectGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74615,3 +74853,1643 @@ func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operati c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionAutoscalers.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } + +type RegionBackendServicesDeleteCall struct { + s *Service + project string + region string + backendService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified regional BackendService resource. +// +// - backendService: Name of the BackendService resource to delete. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { + c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { + c.urlParams_.Set("requestId", requestId) + 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 *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { + 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 *RegionBackendServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesDeleteCall) 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, "projects/{project}/regions/{region}/backendServices/{backendService}") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.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 *RegionBackendServicesDeleteCall) 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", "compute.regionBackendServices.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesGetCall struct { + s *Service + project string + region string + backendService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified regional BackendService resource. +// +// - backendService: Name of the BackendService resource to return. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { + c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + 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 *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { + 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 *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { + 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 *RegionBackendServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesGetCall) 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, "projects/{project}/regions/{region}/backendServices/{backendService}") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.get", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendService.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 *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, 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 := &BackendService{ + 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", "compute.regionBackendServices.get", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesGetHealthCall struct { + s *Service + project string + region string + backendService string + resourcegroupreference *ResourceGroupReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetHealth: Gets the most recent health check results for this regional +// BackendService. +// +// - backendService: Name of the BackendService resource for which to get +// health. +// - project: . +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { + c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.resourcegroupreference = resourcegroupreference + 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 *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { + 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 *RegionBackendServicesGetHealthCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcegroupreference) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getHealth", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.getHealth" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceGroupHealth.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 *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, 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 := &BackendServiceGroupHealth{ + 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", "compute.regionBackendServices.getHealth", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) GetIamPolicy(project string, region string, resource string) *RegionBackendServicesGetIamPolicyCall { + c := &RegionBackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionBackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendServicesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + 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 *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetIamPolicyCall { + 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 *RegionBackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesGetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesGetIamPolicyCall { + 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 *RegionBackendServicesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesGetIamPolicyCall) 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, "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.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 *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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", "compute.regionBackendServices.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesInsertCall struct { + s *Service + project string + region string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a regional BackendService resource in the specified project +// using the data included in the request. For more information, see Backend +// services overview. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { + c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendservice = backendservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { + c.urlParams_.Set("requestId", requestId) + 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 *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { + 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 *RegionBackendServicesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") + 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{ + "project": c.project, + "region": c.region, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.insert" 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 *RegionBackendServicesInsertCall) 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", "compute.regionBackendServices.insert", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of regional BackendService resources available to +// the specified project in the given region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { + c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + 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 *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { + 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 *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { + 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 *RegionBackendServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesListCall) 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, "projects/{project}/regions/{region}/backendServices") + 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{ + "project": c.project, + "region": c.region, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceList.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 *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, 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 := &BackendServiceList{ + 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", "compute.regionBackendServices.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 *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) 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 RegionBackendServicesListUsableCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListUsable: Retrieves a list of all usable backend services in the specified +// project in the given region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. It must be a string that +// meets the requirements in RFC1035. +func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { + c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + 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 *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { + 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 *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { + 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 *RegionBackendServicesListUsableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesListUsableCall) 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, "projects/{project}/regions/{region}/backendServices/listUsable") + 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{ + "project": c.project, + "region": c.region, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.listUsable" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServiceListUsable.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 *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, 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 := &BackendServiceListUsable{ + 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", "compute.regionBackendServices.listUsable", "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 *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) 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 RegionBackendServicesPatchCall struct { + s *Service + project string + region string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified regional BackendService resource with the data +// included in the request. For more information, see Understanding backend +// services This method supports PATCH semantics and uses the JSON merge patch +// format and processing rules. +// +// - backendService: Name of the BackendService resource to patch. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { + c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.backendservice = backendservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + 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 *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { + 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 *RegionBackendServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.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 *RegionBackendServicesPatchCall) 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", "compute.regionBackendServices.patch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { + c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + 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 *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { + 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 *RegionBackendServicesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.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 *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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", "compute.regionBackendServices.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesSetSecurityPolicyCall struct { + s *Service + project string + region string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the +// specified backend service. For more information, see Google Cloud Armor +// Overview +// +// - backendService: Name of the BackendService resource to which the security +// policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { + c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) + 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 *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { + 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 *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") + 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{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.setSecurityPolicy" 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 *RegionBackendServicesSetSecurityPolicyCall) 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", "compute.regionBackendServices.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { + c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + 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 *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { + 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 *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + 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", "compute.regionBackendServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionBackendServicesUpdateCall struct { + s *Service + project string + region string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the specified regional BackendService resource with the data +// included in the request. For more information, see Backend services overview +// . +// +// - backendService: Name of the BackendService resource to update. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { + c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.backendservice = backendservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { + c.urlParams_.Set("requestId", requestId) + 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 *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { + 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 *RegionBackendServicesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.update" 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 *RegionBackendServicesUpdateCall) 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", "compute.regionBackendServices.update", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index 47f430dc209..aab2a9ba733 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -16,93 +16,184 @@ import ( gensupport "google.golang.org/api/internal/gensupport" ) -type RegionBackendServicesDeleteCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified regional BackendService resource. +// AggregatedList: Retrieves an aggregated list of commitments by region. To +// prevent failure, Google recommends that you set the `returnPartialSuccess` +// parameter to `true`. // -// - backendService: Name of the BackendService resource to delete. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { - c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { + c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.backendService = backendService return c } -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *RegionCommitmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionCommitmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *RegionCommitmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) 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 *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { +func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { 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 *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { +func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { 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 *RegionBackendServicesDeleteCall) Header() http.Header { +func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsAggregatedListCall) 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, "projects/{project}/regions/{region}/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/commitments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, + "project": c.project, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.delete" call. +// Do executes the "compute.regionCommitments.aggregatedList" 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 *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *CommitmentAggregatedList.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 *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -121,7 +212,7 @@ func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &CommitmentAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -132,94 +223,119 @@ func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionBackendServicesGetCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) 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 RegionCommitmentsCalculateCancellationFeeCall struct { + s *Service + project string + region string + commitment string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified regional BackendService resource. +// CalculateCancellationFee: Calculate cancellation fee for the specified +// commitment. // -// - backendService: Name of the BackendService resource to return. +// - commitment: Name of the commitment to delete. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { - c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) CalculateCancellationFee(project string, region string, commitment string) *RegionCommitmentsCalculateCancellationFeeCall { + c := &RegionCommitmentsCalculateCancellationFeeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService + c.commitment = commitment + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionCommitmentsCalculateCancellationFeeCall) RequestId(requestId string) *RegionCommitmentsCalculateCancellationFeeCall { + c.urlParams_.Set("requestId", requestId) 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 *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { +func (c *RegionCommitmentsCalculateCancellationFeeCall) Fields(s ...googleapi.Field) *RegionCommitmentsCalculateCancellationFeeCall { 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 *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { +func (c *RegionCommitmentsCalculateCancellationFeeCall) Context(ctx context.Context) *RegionCommitmentsCalculateCancellationFeeCall { 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 *RegionBackendServicesGetCall) Header() http.Header { +func (c *RegionCommitmentsCalculateCancellationFeeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsCalculateCancellationFeeCall) 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, "projects/{project}/regions/{region}/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/calculateCancellationFee") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, + "project": c.project, + "region": c.region, + "commitment": c.commitment, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.calculateCancellationFee", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.get" call. +// Do executes the "compute.regionCommitments.calculateCancellationFee" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { +func (c *RegionCommitmentsCalculateCancellationFeeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -238,7 +354,7 @@ func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*Backen if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendService{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -249,91 +365,97 @@ func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*Backen if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.calculateCancellationFee", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionBackendServicesGetHealthCall struct { - s *Service - project string - region string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsCancelCall struct { + s *Service + project string + region string + commitment string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetHealth: Gets the most recent health check results for this regional -// BackendService. +// Cancel: Cancel the specified commitment. // -// - backendService: Name of the BackendService resource for which to get -// health. -// - project: . -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { - c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - commitment: Name of the commitment to delete. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) Cancel(project string, region string, commitment string) *RegionCommitmentsCancelCall { + c := &RegionCommitmentsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference + c.commitment = commitment + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionCommitmentsCancelCall) RequestId(requestId string) *RegionCommitmentsCancelCall { + c.urlParams_.Set("requestId", requestId) 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 *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { +func (c *RegionCommitmentsCancelCall) Fields(s ...googleapi.Field) *RegionCommitmentsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { +func (c *RegionCommitmentsCancelCall) Context(ctx context.Context) *RegionCommitmentsCancelCall { 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 *RegionBackendServicesGetHealthCall) Header() http.Header { +func (c *RegionCommitmentsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcegroupreference) - if err != nil { - return nil, err - } +func (c *RegionCommitmentsCancelCall) 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, "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, + "project": c.project, + "region": c.region, + "commitment": c.commitment, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getHealth", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.cancel", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.getHealth" call. +// Do executes the "compute.regionCommitments.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.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 *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { +// *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 *RegionCommitmentsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -352,7 +474,7 @@ func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceGroupHealth{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -363,46 +485,38 @@ func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getHealth", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.cancel", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionBackendServicesGetIamPolicyCall struct { +type RegionCommitmentsGetCall struct { s *Service project string region string - resource string + commitment string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// Get: Returns the specified commitment resource. // +// - commitment: Name of the commitment to return. // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) GetIamPolicy(project string, region string, resource string) *RegionBackendServicesGetIamPolicyCall { - c := &RegionBackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { + c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionBackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendServicesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.commitment = commitment 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 *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetIamPolicyCall { +func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -410,34 +524,34 @@ func (c *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *Re // 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 *RegionBackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetIamPolicyCall { +func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesGetIamPolicyCall { +func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { 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 *RegionBackendServicesGetIamPolicyCall) Header() http.Header { +func (c *RegionCommitmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsGetCall) 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, "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -445,20 +559,20 @@ func (c *RegionBackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "commitment": c.commitment, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.getIamPolicy" call. +// Do executes the "compute.regionCommitments.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in +// *Commitment.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 *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -477,7 +591,7 @@ func (c *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Commitment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -488,31 +602,30 @@ func (c *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionBackendServicesInsertCall struct { - s *Service - project string - region string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsInsertCall struct { + s *Service + project string + region string + commitment *Commitment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a regional BackendService resource in the specified project -// using the data included in the request. For more information, see Backend -// services overview. +// Insert: Creates a commitment in the specified project using the data +// included in the request. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { - c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { + c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendservice = backendservice + c.commitment = commitment return c } @@ -526,7 +639,7 @@ func (r *RegionBackendServicesService) Insert(project string, region string, bac // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { +func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -534,35 +647,35 @@ func (c *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBac // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { +func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { +func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { 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 *RegionBackendServicesInsertCall) Header() http.Header { +func (c *RegionCommitmentsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -573,16 +686,16 @@ func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.insert" call. +// Do executes the "compute.regionCommitments.insert" 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 *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -612,11 +725,11 @@ func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Ope if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionBackendServicesListCall struct { +type RegionCommitmentsListCall struct { s *Service project string region string @@ -626,13 +739,12 @@ type RegionBackendServicesListCall struct { header_ http.Header } -// List: Retrieves the list of regional BackendService resources available to -// the specified project in the given region. +// List: Retrieves a list of commitments contained within the specified region. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { - c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { + c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -670,7 +782,7 @@ func (r *RegionBackendServicesService) List(project string, region string) *Regi // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { +func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { c.urlParams_.Set("filter", filter) return c } @@ -680,7 +792,7 @@ func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServ // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { +func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -693,7 +805,7 @@ func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBack // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { +func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -701,7 +813,7 @@ func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendSe // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { +func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -711,7 +823,7 @@ func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBacke // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { +func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -719,7 +831,7 @@ func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSucces // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { +func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -727,34 +839,34 @@ func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBack // 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 *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { +func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { +func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { 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 *RegionBackendServicesListCall) Header() http.Header { +func (c *RegionCommitmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsListCall) 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, "projects/{project}/regions/{region}/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -765,17 +877,16 @@ func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, e "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.list" call. +// Do executes the "compute.regionCommitments.list" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendServiceList.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 *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { +// *CommitmentList.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 *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -794,7 +905,7 @@ func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*Backe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceList{ + ret := &CommitmentList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -805,14 +916,14 @@ func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*Backe if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.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 *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { +func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -830,167 +941,86 @@ func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*Backe } } -type RegionBackendServicesListUsableCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionCommitmentsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListUsable: Retrieves a list of all usable backend services in the specified -// project in the given region. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. It must be a string that -// meets the requirements in RFC1035. -func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { - c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionCommitmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCommitmentsTestIamPermissionsCall { + c := &RegionCommitmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("filter", filter) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionCommitmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCommitmentsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Context sets the context to be used in this call's Do method. +func (c *RegionCommitmentsTestIamPermissionsCall) Context(ctx context.Context) *RegionCommitmentsTestIamPermissionsCall { + c.ctx_ = ctx return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionCommitmentsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - 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 *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { - 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 *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { - 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 *RegionBackendServicesListUsableCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionCommitmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/listUsable") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.listUsable" call. +// Do executes the "compute.regionCommitments.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendServiceListUsable.ServerResponse.Header or (if a response was +// *TestPermissionsResponse.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 *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, error) { +func (c *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1009,7 +1039,7 @@ func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceListUsable{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1020,56 +1050,40 @@ func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionBackendServices.listUsable", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "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 *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) 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 RegionBackendServicesPatchCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsUpdateCall struct { + s *Service + project string + region string + commitment string + commitment2 *Commitment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified regional BackendService resource with the data -// included in the request. For more information, see Understanding backend -// services This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// Update: Updates the specified commitment with the data included in the +// request. Update is performed only on selected fields included as part of +// update-mask. Only the following fields can be updated: auto_renew and plan. // -// - backendService: Name of the BackendService resource to patch. +// - commitment: Name of the commitment that you want to update. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { - c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) Update(project string, region string, commitment string, commitment2 *Commitment) *RegionCommitmentsUpdateCall { + c := &RegionCommitmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService - c.backendservice = backendservice + c.commitment = commitment + c.commitment2 = commitment2 + return c +} + +// Paths sets the optional parameter "paths": +func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsUpdateCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) return c } @@ -1083,176 +1097,71 @@ func (r *RegionBackendServicesService) Patch(project string, region string, back // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { +func (c *RegionCommitmentsUpdateCall) RequestId(requestId string) *RegionCommitmentsUpdateCall { c.urlParams_.Set("requestId", requestId) 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 *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { - 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 *RegionBackendServicesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.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 *RegionBackendServicesPatchCall) 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", "compute.regionBackendServices.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { - c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *RegionCommitmentsUpdateCall) UpdateMask(updateMask string) *RegionCommitmentsUpdateCall { + 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 *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { +func (c *RegionCommitmentsUpdateCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { +func (c *RegionCommitmentsUpdateCall) Context(ctx context.Context) *RegionCommitmentsUpdateCall { 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 *RegionBackendServicesSetIamPolicyCall) Header() http.Header { +func (c *RegionCommitmentsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment2) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "commitment": c.commitment, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.setIamPolicy" call. +// Do executes the "compute.regionCommitments.update" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *RegionCommitmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1264,651 +1173,52 @@ func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) 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 := &Policy{ - 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", "compute.regionBackendServices.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesSetSecurityPolicyCall struct { - s *Service - project string - region string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified backend service. For more information, see Google Cloud Armor -// Overview -// -// - backendService: Name of the BackendService resource to which the security -// policy should be set. The name should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { - c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("requestId", requestId) - 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 *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { - 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 *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.setSecurityPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.setSecurityPolicy" 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 *RegionBackendServicesSetSecurityPolicyCall) 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", "compute.regionBackendServices.setSecurityPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { - c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - 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 *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { - 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 *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions") - 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - 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", "compute.regionBackendServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionBackendServicesUpdateCall struct { - s *Service - project string - region string - backendService string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates the specified regional BackendService resource with the data -// included in the request. For more information, see Backend services overview -// . -// -// - backendService: Name of the BackendService resource to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { - c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("requestId", requestId) - 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 *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { - 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 *RegionBackendServicesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backendservice) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionBackendServices.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.update" 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 *RegionBackendServicesUpdateCall) 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", "compute.regionBackendServices.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionCommitmentsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of commitments by region. To -// prevent failure, Google recommends that you set the `returnPartialSuccess` -// parameter to `true`. -// -// - project: Project ID for this request. -func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { - c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *RegionCommitmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionCommitmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *RegionCommitmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - 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 *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { - 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 *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { - 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 *RegionCommitmentsAggregatedListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionCommitmentsAggregatedListCall) 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, "projects/{project}/aggregated/commitments") - 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{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.aggregatedList", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionCommitments.aggregatedList" call. -// Any non-2xx status code is an error. Response headers are in either -// *CommitmentAggregatedList.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 *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, 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 := &CommitmentAggregatedList{ - 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", "compute.regionCommitments.aggregatedList", "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 *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) 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) + 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", "compute.regionCommitments.update", "response", internallog.HTTPResponse(res, b)) + return ret, nil } -type RegionCommitmentsCalculateCancellationFeeCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsUpdateReservationsCall struct { + s *Service + project string + region string + commitment string + regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CalculateCancellationFee: Calculate cancellation fee for the specified -// commitment. +// UpdateReservations: Transfers GPUs or Local SSD disks between reservations +// that are attached to the same commitment. // -// - commitment: Name of the commitment to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) CalculateCancellationFee(project string, region string, commitment string) *RegionCommitmentsCalculateCancellationFeeCall { - c := &RegionCommitmentsCalculateCancellationFeeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - commitment: Name of the commitment for which the reservations are being +// updated. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) UpdateReservations(project string, region string, commitment string, regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest) *RegionCommitmentsUpdateReservationsCall { + c := &RegionCommitmentsUpdateReservationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.commitment = commitment + c.regioncommitmentsupdatereservationsrequest = regioncommitmentsupdatereservationsrequest return c } @@ -1922,7 +1232,7 @@ func (r *RegionCommitmentsService) CalculateCancellationFee(project string, regi // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsCalculateCancellationFeeCall) RequestId(requestId string) *RegionCommitmentsCalculateCancellationFeeCall { +func (c *RegionCommitmentsUpdateReservationsCall) RequestId(requestId string) *RegionCommitmentsUpdateReservationsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -1930,33 +1240,37 @@ func (c *RegionCommitmentsCalculateCancellationFeeCall) RequestId(requestId stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsCalculateCancellationFeeCall) Fields(s ...googleapi.Field) *RegionCommitmentsCalculateCancellationFeeCall { +func (c *RegionCommitmentsUpdateReservationsCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateReservationsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsCalculateCancellationFeeCall) Context(ctx context.Context) *RegionCommitmentsCalculateCancellationFeeCall { +func (c *RegionCommitmentsUpdateReservationsCall) Context(ctx context.Context) *RegionCommitmentsUpdateReservationsCall { 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 *RegionCommitmentsCalculateCancellationFeeCall) Header() http.Header { +func (c *RegionCommitmentsUpdateReservationsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsCalculateCancellationFeeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioncommitmentsupdatereservationsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/calculateCancellationFee") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -1966,16 +1280,16 @@ func (c *RegionCommitmentsCalculateCancellationFeeCall) doRequest(alt string) (* "region": c.region, "commitment": c.commitment, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.calculateCancellationFee", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.calculateCancellationFee" call. +// Do executes the "compute.regionCommitments.updateReservations" 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 *RegionCommitmentsCalculateCancellationFeeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2005,97 +1319,90 @@ func (c *RegionCommitmentsCalculateCancellationFeeCall) Do(opts ...googleapi.Cal if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.calculateCancellationFee", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCommitmentsCancelCall struct { - s *Service - project string - region string - commitment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDiskSettingsGetCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Cancel the specified commitment. +// Get: Get Regional Disk Settings. // -// - commitment: Name of the commitment to delete. // - project: Project ID for this request. // - region: Name of the region for this request. -func (r *RegionCommitmentsService) Cancel(project string, region string, commitment string) *RegionCommitmentsCancelCall { - c := &RegionCommitmentsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDiskSettingsService) Get(project string, region string) *RegionDiskSettingsGetCall { + c := &RegionDiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsCancelCall) RequestId(requestId string) *RegionCommitmentsCancelCall { - c.urlParams_.Set("requestId", requestId) 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 *RegionCommitmentsCancelCall) Fields(s ...googleapi.Field) *RegionCommitmentsCancelCall { +func (c *RegionDiskSettingsGetCall) Fields(s ...googleapi.Field) *RegionDiskSettingsGetCall { 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 *RegionDiskSettingsGetCall) IfNoneMatch(entityTag string) *RegionDiskSettingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsCancelCall) Context(ctx context.Context) *RegionCommitmentsCancelCall { +func (c *RegionDiskSettingsGetCall) Context(ctx context.Context) *RegionDiskSettingsGetCall { 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 *RegionCommitmentsCancelCall) Header() http.Header { +func (c *RegionDiskSettingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDiskSettingsGetCall) 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, "projects/{project}/regions/{region}/commitments/{commitment}/cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, + "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.cancel", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.cancel" call. +// Do executes the "compute.regionDiskSettings.get" 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 +// *DiskSettings.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 *RegionCommitmentsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2114,7 +1421,7 @@ func (c *RegionCommitmentsCancelCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &DiskSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2125,94 +1432,106 @@ func (c *RegionCommitmentsCancelCall) Do(opts ...googleapi.CallOption) (*Operati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.cancel", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCommitmentsGetCall struct { +type RegionDiskSettingsPatchCall struct { s *Service project string region string - commitment string + disksettings *DiskSettings urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified commitment resource. +// Patch: Patch Regional Disk Settings // -// - commitment: Name of the commitment to return. // - project: Project ID for this request. // - region: Name of the region for this request. -func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { - c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDiskSettingsService) Patch(project string, region string, disksettings *DiskSettings) *RegionDiskSettingsPatchCall { + c := &RegionDiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment + c.disksettings = disksettings + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionDiskSettingsPatchCall) RequestId(requestId string) *RegionDiskSettingsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *RegionDiskSettingsPatchCall) UpdateMask(updateMask string) *RegionDiskSettingsPatchCall { + 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 *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { +func (c *RegionDiskSettingsPatchCall) Fields(s ...googleapi.Field) *RegionDiskSettingsPatchCall { 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 *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { +func (c *RegionDiskSettingsPatchCall) Context(ctx context.Context) *RegionDiskSettingsPatchCall { 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 *RegionCommitmentsGetCall) Header() http.Header { +func (c *RegionDiskSettingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskSettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, + "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.get" call. +// Do executes the "compute.regionDiskSettings.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Commitment.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { +func (c *RegionDiskSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2231,7 +1550,7 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Commitment{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2242,100 +1561,94 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCommitmentsInsertCall struct { - s *Service - project string - region string - commitment *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDiskTypesGetCall struct { + s *Service + project string + region string + diskType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Creates a commitment in the specified project using the data -// included in the request. +// Get: Returns the specified regional disk type. // +// - diskType: Name of the disk type to return. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { - c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { + c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { - c.urlParams_.Set("requestId", requestId) + c.diskType = diskType 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 *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { +func (c *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGetCall { 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 *RegionDiskTypesGetCall) IfNoneMatch(entityTag string) *RegionDiskTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { +func (c *RegionDiskTypesGetCall) Context(ctx context.Context) *RegionDiskTypesGetCall { 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 *RegionCommitmentsInsertCall) Header() http.Header { +func (c *RegionDiskTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment) - if err != nil { - return nil, err +func (c *RegionDiskTypesGetCall) 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, "projects/{project}/regions/{region}/commitments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes/{diskType}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "diskType": c.diskType, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.insert" call. +// Do executes the "compute.regionDiskTypes.get" 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 +// *DiskType.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 *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2354,7 +1667,7 @@ func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &DiskType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2365,11 +1678,11 @@ func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCommitmentsListCall struct { +type RegionDiskTypesListCall struct { s *Service project string region string @@ -2379,12 +1692,13 @@ type RegionCommitmentsListCall struct { header_ http.Header } -// List: Retrieves a list of commitments contained within the specified region. +// List: Retrieves a list of regional disk types available to the specified +// project. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { - c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { + c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -2422,7 +1736,7 @@ func (r *RegionCommitmentsService) List(project string, region string) *RegionCo // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { +func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall { c.urlParams_.Set("filter", filter) return c } @@ -2432,7 +1746,7 @@ func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsList // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { +func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -2445,7 +1759,7 @@ func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitme // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { +func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -2453,7 +1767,7 @@ func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsLi // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { +func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2463,7 +1777,7 @@ func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmen // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsListCall { +func (c *RegionDiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDiskTypesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -2471,7 +1785,7 @@ func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { +func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2479,34 +1793,34 @@ func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitme // 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 *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { +func (c *RegionDiskTypesListCall) IfNoneMatch(entityTag string) *RegionDiskTypesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { +func (c *RegionDiskTypesListCall) Context(ctx context.Context) *RegionDiskTypesListCall { 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 *RegionCommitmentsListCall) Header() http.Header { +func (c *RegionDiskTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDiskTypesListCall) 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, "projects/{project}/regions/{region}/commitments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -2517,16 +1831,17 @@ func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.list" call. +// Do executes the "compute.regionDiskTypes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *CommitmentList.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 *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { +// *RegionDiskTypeList.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 *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskTypeList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2545,7 +1860,7 @@ func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*Commitmen if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CommitmentList{ + ret := &RegionDiskTypeList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2556,14 +1871,14 @@ func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*Commitmen if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.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 *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { +func (c *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskTypeList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -2581,64 +1896,80 @@ func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*Commitmen } } -type RegionCommitmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksAddResourcePoliciesCall struct { + s *Service + project string + region string + disk string + regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// AddResourcePolicies: Adds existing resource policies to a regional disk. You +// can only add one policy which will be applied to this disk for scheduling +// snapshot creation. // +// - disk: The disk name for this request. // - project: Project ID for this request. // - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionCommitmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionCommitmentsTestIamPermissionsCall { - c := &RegionCommitmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { + c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.disk = disk + c.regiondisksaddresourcepoliciesrequest = regiondisksaddresourcepoliciesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *RegionDisksAddResourcePoliciesCall { + c.urlParams_.Set("requestId", requestId) 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 *RegionCommitmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionCommitmentsTestIamPermissionsCall { +func (c *RegionDisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksAddResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsTestIamPermissionsCall) Context(ctx context.Context) *RegionCommitmentsTestIamPermissionsCall { +func (c *RegionDisksAddResourcePoliciesCall) Context(ctx context.Context) *RegionDisksAddResourcePoliciesCall { 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 *RegionCommitmentsTestIamPermissionsCall) Header() http.Header { +func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksaddresourcepoliciesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -2646,21 +1977,20 @@ func (c *RegionCommitmentsTestIamPermissionsCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.testIamPermissions" call. +// Do executes the "compute.regionDisks.addResourcePolicies" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2679,7 +2009,7 @@ func (c *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2690,40 +2020,29 @@ func (c *RegionCommitmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOptio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCommitmentsUpdateCall struct { - s *Service - project string - region string - commitment string - commitment2 *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksBulkInsertCall struct { + s *Service + project string + region string + bulkinsertdiskresource *BulkInsertDiskResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified commitment with the data included in the -// request. Update is performed only on selected fields included as part of -// update-mask. Only the following fields can be updated: auto_renew and plan. +// BulkInsert: Bulk create a set of disks. // -// - commitment: Name of the commitment that you want to update. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Update(project string, region string, commitment string, commitment2 *Commitment) *RegionCommitmentsUpdateCall { - c := &RegionCommitmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) BulkInsert(project string, region string, bulkinsertdiskresource *BulkInsertDiskResource) *RegionDisksBulkInsertCall { + c := &RegionDisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment - c.commitment2 = commitment2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + c.bulkinsertdiskresource = bulkinsertdiskresource return c } @@ -2735,73 +2054,65 @@ func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsU // same request ID, the server can check if original operation with the same // request ID was received, and if so, will ignore the second request. This // prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsUpdateCall) RequestId(requestId string) *RegionCommitmentsUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionCommitmentsUpdateCall) UpdateMask(updateMask string) *RegionCommitmentsUpdateCall { - c.urlParams_.Set("updateMask", updateMask) +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulkInsertCall { + c.urlParams_.Set("requestId", requestId) 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 *RegionCommitmentsUpdateCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateCall { +func (c *RegionDisksBulkInsertCall) Fields(s ...googleapi.Field) *RegionDisksBulkInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsUpdateCall) Context(ctx context.Context) *RegionCommitmentsUpdateCall { +func (c *RegionDisksBulkInsertCall) Context(ctx context.Context) *RegionDisksBulkInsertCall { 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 *RegionCommitmentsUpdateCall) Header() http.Header { +func (c *RegionDisksBulkInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.commitment2) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertdiskresource) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/bulkInsert") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, + "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.update" call. +// Do executes the "compute.regionDisks.bulkInsert" 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 *RegionCommitmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2831,34 +2142,43 @@ func (c *RegionCommitmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionCommitmentsUpdateReservationsCall struct { - s *Service - project string - region string - commitment string - regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksCreateSnapshotCall struct { + s *Service + project string + region string + disk string + snapshot *Snapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateReservations: Transfers GPUs or Local SSD disks between reservations -// that are attached to the same commitment. +// CreateSnapshot: Creates a snapshot of a specified persistent disk. For +// regular snapshot creation, consider using snapshots.insert instead, as that +// method supports more features, such as creating snapshots in a project +// different from the source disk project. // -// - commitment: Name of the commitment for which the reservations are being -// updated. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) UpdateReservations(project string, region string, commitment string, regioncommitmentsupdatereservationsrequest *RegionCommitmentsUpdateReservationsRequest) *RegionCommitmentsUpdateReservationsCall { - c := &RegionCommitmentsUpdateReservationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: Name of the regional persistent disk to snapshot. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { + c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment - c.regioncommitmentsupdatereservationsrequest = regioncommitmentsupdatereservationsrequest + c.disk = disk + c.snapshot = snapshot + return c +} + +// GuestFlush sets the optional parameter "guestFlush": [Input Only] Specifies +// to create an application consistent snapshot by informing the OS to prepare +// for the snapshot process. +func (c *RegionDisksCreateSnapshotCall) GuestFlush(guestFlush bool) *RegionDisksCreateSnapshotCall { + c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) return c } @@ -2872,7 +2192,7 @@ func (r *RegionCommitmentsService) UpdateReservations(project string, region str // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionCommitmentsUpdateReservationsCall) RequestId(requestId string) *RegionCommitmentsUpdateReservationsCall { +func (c *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisksCreateSnapshotCall { c.urlParams_.Set("requestId", requestId) return c } @@ -2880,35 +2200,35 @@ func (c *RegionCommitmentsUpdateReservationsCall) RequestId(requestId string) *R // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsUpdateReservationsCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateReservationsCall { +func (c *RegionDisksCreateSnapshotCall) Fields(s ...googleapi.Field) *RegionDisksCreateSnapshotCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsUpdateReservationsCall) Context(ctx context.Context) *RegionCommitmentsUpdateReservationsCall { +func (c *RegionDisksCreateSnapshotCall) Context(ctx context.Context) *RegionDisksCreateSnapshotCall { 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 *RegionCommitmentsUpdateReservationsCall) Header() http.Header { +func (c *RegionDisksCreateSnapshotCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regioncommitmentsupdatereservationsrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}/updateReservations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/createSnapshot") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -2916,20 +2236,20 @@ func (c *RegionCommitmentsUpdateReservationsCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, + "project": c.project, + "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.updateReservations" call. +// Do executes the "compute.regionDisks.createSnapshot" 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 *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2959,72 +2279,81 @@ func (c *RegionCommitmentsUpdateReservationsCall) Do(opts ...googleapi.CallOptio if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionCommitments.updateReservations", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDiskSettingsGetCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksDeleteCall struct { + s *Service + project string + region string + disk string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Get Regional Disk Settings. +// Delete: Deletes the specified regional persistent disk. Deleting a regional +// disk removes all the replicas of its data permanently and is irreversible. +// However, deleting a disk does not delete any snapshots previously made from +// the disk. You must separately delete snapshots. // +// - disk: Name of the regional persistent disk to delete. // - project: Project ID for this request. // - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Get(project string, region string) *RegionDiskSettingsGetCall { - c := &RegionDiskSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { + c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.disk = disk + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCall { + c.urlParams_.Set("requestId", requestId) 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 *RegionDiskSettingsGetCall) Fields(s ...googleapi.Field) *RegionDiskSettingsGetCall { +func (c *RegionDisksDeleteCall) Fields(s ...googleapi.Field) *RegionDisksDeleteCall { 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 *RegionDiskSettingsGetCall) IfNoneMatch(entityTag string) *RegionDiskSettingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsGetCall) Context(ctx context.Context) *RegionDiskSettingsGetCall { +func (c *RegionDisksDeleteCall) Context(ctx context.Context) *RegionDisksDeleteCall { 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 *RegionDiskSettingsGetCall) Header() http.Header { +func (c *RegionDisksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDiskSettingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksDeleteCall) 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, "projects/{project}/regions/{region}/diskSettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } @@ -3032,17 +2361,18 @@ func (c *RegionDiskSettingsGetCall) doRequest(alt string) (*http.Response, error googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDiskSettings.get" call. +// Do executes the "compute.regionDisks.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *DiskSettings.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSettings, error) { +func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3061,7 +2391,7 @@ func (c *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSetti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskSettings{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3072,88 +2402,75 @@ func (c *RegionDiskSettingsGetCall) Do(opts ...googleapi.CallOption) (*DiskSetti if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDiskSettingsPatchCall struct { +type RegionDisksGetCall struct { s *Service project string region string - disksettings *DiskSettings + disk string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Patch: Patch Regional Disk Settings +// Get: Returns a specified regional persistent disk. // +// - disk: Name of the regional persistent disk to return. // - project: Project ID for this request. // - region: Name of the region for this request. -func (r *RegionDiskSettingsService) Patch(project string, region string, disksettings *DiskSettings) *RegionDiskSettingsPatchCall { - c := &RegionDiskSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { + c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disksettings = disksettings - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDiskSettingsPatchCall) RequestId(requestId string) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionDiskSettingsPatchCall) UpdateMask(updateMask string) *RegionDiskSettingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.disk = disk 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 *RegionDiskSettingsPatchCall) Fields(s ...googleapi.Field) *RegionDiskSettingsPatchCall { +func (c *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { 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 *RegionDisksGetCall) IfNoneMatch(entityTag string) *RegionDisksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionDiskSettingsPatchCall) Context(ctx context.Context) *RegionDiskSettingsPatchCall { +func (c *RegionDisksGetCall) Context(ctx context.Context) *RegionDisksGetCall { 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 *RegionDiskSettingsPatchCall) Header() http.Header { +func (c *RegionDisksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksettings) - if err != nil { - return nil, err +func (c *RegionDisksGetCall) 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, "projects/{project}/regions/{region}/diskSettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -3161,17 +2478,18 @@ func (c *RegionDiskSettingsPatchCall) doRequest(alt string) (*http.Response, err googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDiskSettings.patch" call. +// Do executes the "compute.regionDisks.get" 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 +// *Disk.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 *RegionDiskSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3190,7 +2508,7 @@ func (c *RegionDiskSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Disk{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3201,38 +2519,40 @@ func (c *RegionDiskSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskSettings.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDiskTypesGetCall struct { +type RegionDisksGetAsyncReplicationStatusCall struct { s *Service project string region string - diskType string + disk string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified regional disk type. +// GetAsyncReplicationStatus: Gets the status of current async replication for +// a given device. // -// - diskType: Name of the disk type to return. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { - c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: Name of the Disk resource whose Async replication details are +// requested. Name should conform to RFC1035 or be an unsigned long integer. +// - project: Project ID for this request. +// - region: The name of the zone for this request. +func (r *RegionDisksService) GetAsyncReplicationStatus(project string, region string, disk string) *RegionDisksGetAsyncReplicationStatusCall { + c := &RegionDisksGetAsyncReplicationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.diskType = diskType + c.disk = disk 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 *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGetCall { +func (c *RegionDisksGetAsyncReplicationStatusCall) Fields(s ...googleapi.Field) *RegionDisksGetAsyncReplicationStatusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3240,34 +2560,34 @@ func (c *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGe // 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 *RegionDiskTypesGetCall) IfNoneMatch(entityTag string) *RegionDiskTypesGetCall { +func (c *RegionDisksGetAsyncReplicationStatusCall) IfNoneMatch(entityTag string) *RegionDisksGetAsyncReplicationStatusCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesGetCall) Context(ctx context.Context) *RegionDiskTypesGetCall { +func (c *RegionDisksGetAsyncReplicationStatusCall) Context(ctx context.Context) *RegionDisksGetAsyncReplicationStatusCall { 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 *RegionDiskTypesGetCall) Header() http.Header { +func (c *RegionDisksGetAsyncReplicationStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksGetAsyncReplicationStatusCall) 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, "projects/{project}/regions/{region}/diskTypes/{diskType}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/getAsyncReplicationStatus") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -3275,20 +2595,21 @@ func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "diskType": c.diskType, + "project": c.project, + "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.getAsyncReplicationStatus", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDiskTypes.get" call. +// Do executes the "compute.regionDisks.getAsyncReplicationStatus" call. // Any non-2xx status code is an error. Response headers are in either -// *DiskType.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 *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { +// *GetAsyncReplicationStatusResponse.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 *RegionDisksGetAsyncReplicationStatusCall) Do(opts ...googleapi.CallOption) (*GetAsyncReplicationStatusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3307,7 +2628,7 @@ func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskType{ + ret := &GetAsyncReplicationStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3318,114 +2639,46 @@ func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.getAsyncReplicationStatus", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDiskTypesListCall struct { +type RegionDisksGetIamPolicyCall struct { s *Service project string region string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of regional disk types available to the specified -// project. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // // - project: Project ID for this request. // - region: The name of the region for this request. -func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { - c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { + c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.resource = resource return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionDiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDiskTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 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 *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesListCall { +func (c *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3433,34 +2686,34 @@ func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesL // 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 *RegionDiskTypesListCall) IfNoneMatch(entityTag string) *RegionDiskTypesListCall { +func (c *RegionDisksGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionDisksGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesListCall) Context(ctx context.Context) *RegionDiskTypesListCall { +func (c *RegionDisksGetIamPolicyCall) Context(ctx context.Context) *RegionDisksGetIamPolicyCall { 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 *RegionDiskTypesListCall) Header() http.Header { +func (c *RegionDisksGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksGetIamPolicyCall) 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, "projects/{project}/regions/{region}/diskTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -3468,20 +2721,20 @@ func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDiskTypes.list" call. +// Do executes the "compute.regionDisks.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionDiskTypeList.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 *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskTypeList, error) { +// *Policy.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 *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3500,7 +2753,7 @@ func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskT if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionDiskTypeList{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3511,55 +2764,30 @@ func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskT if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDiskTypes.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "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 *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskTypeList) 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 RegionDisksAddResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksInsertCall struct { + s *Service + project string + region string + disk *Disk + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddResourcePolicies: Adds existing resource policies to a regional disk. You -// can only add one policy which will be applied to this disk for scheduling -// snapshot creation. +// Insert: Creates a persistent regional disk in the specified project using +// the data included in the request. // -// - disk: The disk name for this request. // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { - c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { + c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk - c.regiondisksaddresourcepoliciesrequest = regiondisksaddresourcepoliciesrequest return c } @@ -3573,43 +2801,50 @@ func (r *RegionDisksService) AddResourcePolicies(project string, region string, // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *RegionDisksAddResourcePoliciesCall { +func (c *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { c.urlParams_.Set("requestId", requestId) return c } +// SourceImage sets the optional parameter "sourceImage": Source image to +// restore onto a disk. This field is optional. +func (c *RegionDisksInsertCall) SourceImage(sourceImage string) *RegionDisksInsertCall { + c.urlParams_.Set("sourceImage", sourceImage) + 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 *RegionDisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksAddResourcePoliciesCall { +func (c *RegionDisksInsertCall) Fields(s ...googleapi.Field) *RegionDisksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksAddResourcePoliciesCall) Context(ctx context.Context) *RegionDisksAddResourcePoliciesCall { +func (c *RegionDisksInsertCall) Context(ctx context.Context) *RegionDisksInsertCall { 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 *RegionDisksAddResourcePoliciesCall) Header() http.Header { +func (c *RegionDisksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksaddresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3619,18 +2854,17 @@ func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Respon googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.addResourcePolicies" call. +// Do executes the "compute.regionDisks.insert" 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 *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3660,81 +2894,151 @@ func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.addResourcePolicies", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksBulkInsertCall struct { - s *Service - project string - region string - bulkinsertdiskresource *BulkInsertDiskResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// BulkInsert: Bulk create a set of disks. +// List: Retrieves the list of persistent disks contained within the specified +// region. // // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) BulkInsert(project string, region string, bulkinsertdiskresource *BulkInsertDiskResource) *RegionDisksBulkInsertCall { - c := &RegionDisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { + c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.bulkinsertdiskresource = bulkinsertdiskresource return c } -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulkInsertCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionDisksListCall) Filter(filter string) *RegionDisksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionDisksListCall) MaxResults(maxResults int64) *RegionDisksListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionDisksListCall) OrderBy(orderBy string) *RegionDisksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionDisksListCall) PageToken(pageToken string) *RegionDisksListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionDisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDisksListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *RegionDisksBulkInsertCall) Fields(s ...googleapi.Field) *RegionDisksBulkInsertCall { +func (c *RegionDisksListCall) Fields(s ...googleapi.Field) *RegionDisksListCall { 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 *RegionDisksListCall) IfNoneMatch(entityTag string) *RegionDisksListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionDisksBulkInsertCall) Context(ctx context.Context) *RegionDisksBulkInsertCall { +func (c *RegionDisksListCall) Context(ctx context.Context) *RegionDisksListCall { 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 *RegionDisksBulkInsertCall) Header() http.Header { +func (c *RegionDisksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.bulkinsertdiskresource) - if err != nil { - return nil, err +func (c *RegionDisksListCall) 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, "projects/{project}/regions/{region}/disks/bulkInsert") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -3743,16 +3047,16 @@ func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.bulkInsert" call. +// Do executes the "compute.regionDisks.list" 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 +// *DiskList.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 *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3771,7 +3075,7 @@ func (c *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &DiskList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3782,43 +3086,53 @@ func (c *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.bulkInsert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksCreateSnapshotCall struct { - s *Service - project string - region string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) 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) + } } -// CreateSnapshot: Creates a snapshot of a specified persistent disk. For -// regular snapshot creation, consider using snapshots.insert instead, as that -// method supports more features, such as creating snapshots in a project -// different from the source disk project. +type RegionDisksRemoveResourcePoliciesCall struct { + s *Service + project string + region string + disk string + regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveResourcePolicies: Removes resource policies from a regional disk. // -// - disk: Name of the regional persistent disk to snapshot. +// - disk: The disk name for this request. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { - c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { + c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk - c.snapshot = snapshot - return c -} - -// GuestFlush sets the optional parameter "guestFlush": [Input Only] Specifies -// to create an application consistent snapshot by informing the OS to prepare -// for the snapshot process. -func (c *RegionDisksCreateSnapshotCall) GuestFlush(guestFlush bool) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush)) + c.regiondisksremoveresourcepoliciesrequest = regiondisksremoveresourcepoliciesrequest return c } @@ -3832,7 +3146,7 @@ func (c *RegionDisksCreateSnapshotCall) GuestFlush(guestFlush bool) *RegionDisks // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisksCreateSnapshotCall { +func (c *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *RegionDisksRemoveResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -3840,35 +3154,35 @@ func (c *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisks // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksCreateSnapshotCall) Fields(s ...googleapi.Field) *RegionDisksCreateSnapshotCall { +func (c *RegionDisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksRemoveResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksCreateSnapshotCall) Context(ctx context.Context) *RegionDisksCreateSnapshotCall { +func (c *RegionDisksRemoveResourcePoliciesCall) Context(ctx context.Context) *RegionDisksRemoveResourcePoliciesCall { 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 *RegionDisksCreateSnapshotCall) Header() http.Header { +func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.snapshot) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksremoveresourcepoliciesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/createSnapshot") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3880,16 +3194,16 @@ func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, e "region": c.region, "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.createSnapshot" call. +// Do executes the "compute.regionDisks.removeResourcePolicies" 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 *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3919,33 +3233,32 @@ func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Opera if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.createSnapshot", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksDeleteCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksResizeCall struct { + s *Service + project string + region string + disk string + regiondisksresizerequest *RegionDisksResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified regional persistent disk. Deleting a regional -// disk removes all the replicas of its data permanently and is irreversible. -// However, deleting a disk does not delete any snapshots previously made from -// the disk. You must separately delete snapshots. +// Resize: Resizes the specified regional persistent disk. // -// - disk: Name of the regional persistent disk to delete. -// - project: Project ID for this request. +// - disk: Name of the regional persistent disk. +// - project: The project ID for this request. // - region: Name of the region for this request. -func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { - c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { + c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk + c.regiondisksresizerequest = regiondisksresizerequest return c } @@ -3959,7 +3272,7 @@ func (r *RegionDisksService) Delete(project string, region string, disk string) // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCall { +func (c *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCall { c.urlParams_.Set("requestId", requestId) return c } @@ -3967,33 +3280,37 @@ func (c *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksDeleteCall) Fields(s ...googleapi.Field) *RegionDisksDeleteCall { +func (c *RegionDisksResizeCall) Fields(s ...googleapi.Field) *RegionDisksResizeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksDeleteCall) Context(ctx context.Context) *RegionDisksDeleteCall { +func (c *RegionDisksResizeCall) Context(ctx context.Context) *RegionDisksResizeCall { 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 *RegionDisksDeleteCall) Header() http.Header { +func (c *RegionDisksResizeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksresizerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/resize") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -4003,16 +3320,16 @@ func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { "region": c.region, "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.delete" call. +// Do executes the "compute.regionDisks.resize" 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 *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4042,94 +3359,89 @@ func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksGetCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns a specified regional persistent disk. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // -// - disk: Name of the regional persistent disk to return. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { - c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { + c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest 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 *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { +func (c *RegionDisksSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksSetIamPolicyCall { 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 *RegionDisksGetCall) IfNoneMatch(entityTag string) *RegionDisksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetCall) Context(ctx context.Context) *RegionDisksGetCall { +func (c *RegionDisksSetIamPolicyCall) Context(ctx context.Context) *RegionDisksSetIamPolicyCall { 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 *RegionDisksGetCall) Header() http.Header { +func (c *RegionDisksSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.get" call. +// Do executes the "compute.regionDisks.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Disk.ServerResponse.Header or (if a response was returned at all) in +// *Policy.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 *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { +func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4148,7 +3460,7 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Disk{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4159,97 +3471,103 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksGetAsyncReplicationStatusCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetAsyncReplicationStatus: Gets the status of current async replication for -// a given device. +// SetLabels: Sets the labels on the target regional disk. // -// - disk: Name of the Disk resource whose Async replication details are -// requested. Name should conform to RFC1035 or be an unsigned long integer. -// - project: Project ID for this request. -// - region: The name of the zone for this request. -func (r *RegionDisksService) GetAsyncReplicationStatus(project string, region string, disk string) *RegionDisksGetAsyncReplicationStatusCall { - c := &RegionDisksGetAsyncReplicationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { + c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLabelsCall { + c.urlParams_.Set("requestId", requestId) 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 *RegionDisksGetAsyncReplicationStatusCall) Fields(s ...googleapi.Field) *RegionDisksGetAsyncReplicationStatusCall { +func (c *RegionDisksSetLabelsCall) Fields(s ...googleapi.Field) *RegionDisksSetLabelsCall { 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 *RegionDisksGetAsyncReplicationStatusCall) IfNoneMatch(entityTag string) *RegionDisksGetAsyncReplicationStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetAsyncReplicationStatusCall) Context(ctx context.Context) *RegionDisksGetAsyncReplicationStatusCall { +func (c *RegionDisksSetLabelsCall) Context(ctx context.Context) *RegionDisksSetLabelsCall { 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 *RegionDisksGetAsyncReplicationStatusCall) Header() http.Header { +func (c *RegionDisksSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksGetAsyncReplicationStatusCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/getAsyncReplicationStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setLabels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.getAsyncReplicationStatus", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.getAsyncReplicationStatus" call. +// Do executes the "compute.regionDisks.setLabels" call. // Any non-2xx status code is an error. Response headers are in either -// *GetAsyncReplicationStatusResponse.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 *RegionDisksGetAsyncReplicationStatusCall) Do(opts ...googleapi.CallOption) (*GetAsyncReplicationStatusResponse, error) { +// *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 *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4268,7 +3586,7 @@ func (c *RegionDisksGetAsyncReplicationStatusCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GetAsyncReplicationStatusResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4279,102 +3597,104 @@ func (c *RegionDisksGetAsyncReplicationStatusCall) Do(opts ...googleapi.CallOpti if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.getAsyncReplicationStatus", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksStartAsyncReplicationCall struct { + s *Service + project string + region string + disk string + regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// StartAsyncReplication: Starts asynchronous replication. Must be invoked on +// the primary disk. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { - c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: The name of the persistent disk. +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionDisksService) StartAsyncReplication(project string, region string, disk string, regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest) *RegionDisksStartAsyncReplicationCall { + c := &RegionDisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource + c.disk = disk + c.regiondisksstartasyncreplicationrequest = regiondisksstartasyncreplicationrequest return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionDisksStartAsyncReplicationCall) RequestId(requestId string) *RegionDisksStartAsyncReplicationCall { + c.urlParams_.Set("requestId", requestId) 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 *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksGetIamPolicyCall { +func (c *RegionDisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStartAsyncReplicationCall { 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 *RegionDisksGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionDisksGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetIamPolicyCall) Context(ctx context.Context) *RegionDisksGetIamPolicyCall { +func (c *RegionDisksStartAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStartAsyncReplicationCall { 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 *RegionDisksGetIamPolicyCall) Header() http.Header { +func (c *RegionDisksStartAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionDisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksstartasyncreplicationrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.getIamPolicy" call. +// Do executes the "compute.regionDisks.startAsyncReplication" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *RegionDisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4393,7 +3713,7 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4404,27 +3724,28 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.getIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksInsertCall struct { +type RegionDisksStopAsyncReplicationCall struct { s *Service project string region string - disk *Disk + disk string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Creates a persistent regional disk in the specified project using -// the data included in the request. +// StopAsyncReplication: Stops asynchronous replication. Can be invoked either +// on the primary or on the secondary disk. // +// - disk: The name of the persistent disk. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { - c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) StopAsyncReplication(project string, region string, disk string) *RegionDisksStopAsyncReplicationCall { + c := &RegionDisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk @@ -4441,52 +3762,41 @@ func (r *RegionDisksService) Insert(project string, region string, disk *Disk) * // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { +func (c *RegionDisksStopAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopAsyncReplicationCall { c.urlParams_.Set("requestId", requestId) return c } -// SourceImage sets the optional parameter "sourceImage": Source image to -// restore onto a disk. This field is optional. -func (c *RegionDisksInsertCall) SourceImage(sourceImage string) *RegionDisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - 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 *RegionDisksInsertCall) Fields(s ...googleapi.Field) *RegionDisksInsertCall { +func (c *RegionDisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksInsertCall) Context(ctx context.Context) *RegionDisksInsertCall { +func (c *RegionDisksStopAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopAsyncReplicationCall { 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 *RegionDisksInsertCall) Header() http.Header { +func (c *RegionDisksStopAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk) - if err != nil { - return nil, err - } +func (c *RegionDisksStopAsyncReplicationCall) 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, "projects/{project}/regions/{region}/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("POST", urls, nil) if err != nil { return nil, err } @@ -4494,17 +3804,18 @@ func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, + "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.insert" call. +// Do executes the "compute.regionDisks.stopAsyncReplication" 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 *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4534,169 +3845,214 @@ func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksStopGroupAsyncReplicationCall struct { + s *Service + project string + region string + disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of persistent disks contained within the specified -// region. +// StopGroupAsyncReplication: Stops asynchronous replication for a consistency +// group of disks. Can be invoked either in the primary or secondary scope. // -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { - c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. This must be the region +// of the primary or secondary disks in the consistency group. +func (r *RegionDisksService) StopGroupAsyncReplication(project string, region string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *RegionDisksStopGroupAsyncReplicationCall { + c := &RegionDisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionDisksListCall) Filter(filter string) *RegionDisksListCall { - c.urlParams_.Set("filter", filter) +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionDisksStopGroupAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopGroupAsyncReplicationCall { + c.urlParams_.Set("requestId", requestId) return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionDisksListCall) MaxResults(maxResults int64) *RegionDisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionDisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopGroupAsyncReplicationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionDisksListCall) OrderBy(orderBy string) *RegionDisksListCall { - c.urlParams_.Set("orderBy", orderBy) +// Context sets the context to be used in this call's Do method. +func (c *RegionDisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopGroupAsyncReplicationCall { + c.ctx_ = ctx return c } -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionDisksListCall) PageToken(pageToken string) *RegionDisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionDisksStopGroupAsyncReplicationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstopgroupasyncreplicationresource) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication") + 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{ + "project": c.project, + "region": c.region, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDisks.stopGroupAsyncReplication" 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 *RegionDisksStopGroupAsyncReplicationCall) 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", "compute.regionDisks.stopGroupAsyncReplication", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionDisksTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionDisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { + c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *RegionDisksListCall) Fields(s ...googleapi.Field) *RegionDisksListCall { +func (c *RegionDisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionDisksTestIamPermissionsCall { 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 *RegionDisksListCall) IfNoneMatch(entityTag string) *RegionDisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionDisksListCall) Context(ctx context.Context) *RegionDisksListCall { +func (c *RegionDisksTestIamPermissionsCall) Context(ctx context.Context) *RegionDisksTestIamPermissionsCall { 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 *RegionDisksListCall) Header() http.Header { +func (c *RegionDisksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.list" call. +// Do executes the "compute.regionDisks.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *DiskList.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 *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { +// *TestPermissionsResponse.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 *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4715,7 +4071,7 @@ func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskList{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4726,53 +4082,40 @@ func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.testIamPermissions", "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 *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) 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 RegionDisksRemoveResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksUpdateCall struct { + s *Service + project string + region string + disk string + disk2 *Disk + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveResourcePolicies: Removes resource policies from a regional disk. +// Update: Update the specified disk with the data included in the request. +// Update is performed only on selected fields included as part of update-mask. +// Only the following fields can be modified: user_license. // // - disk: The disk name for this request. // - project: Project ID for this request. // - region: The name of the region for this request. -func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { - c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) Update(project string, region string, disk string, disk2 *Disk) *RegionDisksUpdateCall { + c := &RegionDisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk - c.regiondisksremoveresourcepoliciesrequest = regiondisksremoveresourcepoliciesrequest + c.disk2 = disk2 + return c +} + +// Paths sets the optional parameter "paths": +func (c *RegionDisksUpdateCall) Paths(paths ...string) *RegionDisksUpdateCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) return c } @@ -4786,45 +4129,52 @@ func (r *RegionDisksService) RemoveResourcePolicies(project string, region strin // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *RegionDisksRemoveResourcePoliciesCall { +func (c *RegionDisksUpdateCall) RequestId(requestId string) *RegionDisksUpdateCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *RegionDisksUpdateCall) UpdateMask(updateMask string) *RegionDisksUpdateCall { + 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 *RegionDisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksRemoveResourcePoliciesCall { +func (c *RegionDisksUpdateCall) Fields(s ...googleapi.Field) *RegionDisksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksRemoveResourcePoliciesCall) Context(ctx context.Context) *RegionDisksRemoveResourcePoliciesCall { +func (c *RegionDisksUpdateCall) Context(ctx context.Context) *RegionDisksUpdateCall { 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 *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { +func (c *RegionDisksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksremoveresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk2) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -4834,16 +4184,16 @@ func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Res "region": c.region, "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.removeResourcePolicies" call. +// Do executes the "compute.regionDisks.update" 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 *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4873,32 +4223,34 @@ func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.removeResourcePolicies", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksResizeCall struct { - s *Service - project string - region string - disk string - regiondisksresizerequest *RegionDisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksWaitForReplicationCatchUpCall struct { + s *Service + project string + region string + disk string + regionwaitforreplicationcatchuprequest *RegionWaitForReplicationCatchUpRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resize: Resizes the specified regional persistent disk. +// WaitForReplicationCatchUp: Wait for replication to catch up on the secondary +// disk. // -// - disk: Name of the regional persistent disk. -// - project: The project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { - c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: The name of the persistent disk. Name should conform to RFC1035 or +// be an unsigned long integer. +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionDisksService) WaitForReplicationCatchUp(project string, region string, disk string, regionwaitforreplicationcatchuprequest *RegionWaitForReplicationCatchUpRequest) *RegionDisksWaitForReplicationCatchUpCall { + c := &RegionDisksWaitForReplicationCatchUpCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk - c.regiondisksresizerequest = regiondisksresizerequest + c.regionwaitforreplicationcatchuprequest = regionwaitforreplicationcatchuprequest return c } @@ -4912,7 +4264,7 @@ func (r *RegionDisksService) Resize(project string, region string, disk string, // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCall { +func (c *RegionDisksWaitForReplicationCatchUpCall) RequestId(requestId string) *RegionDisksWaitForReplicationCatchUpCall { c.urlParams_.Set("requestId", requestId) return c } @@ -4920,35 +4272,35 @@ func (c *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksResizeCall) Fields(s ...googleapi.Field) *RegionDisksResizeCall { +func (c *RegionDisksWaitForReplicationCatchUpCall) Fields(s ...googleapi.Field) *RegionDisksWaitForReplicationCatchUpCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksResizeCall) Context(ctx context.Context) *RegionDisksResizeCall { +func (c *RegionDisksWaitForReplicationCatchUpCall) Context(ctx context.Context) *RegionDisksWaitForReplicationCatchUpCall { 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 *RegionDisksResizeCall) Header() http.Header { +func (c *RegionDisksWaitForReplicationCatchUpCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksWaitForReplicationCatchUpCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksresizerequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionwaitforreplicationcatchuprequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/resize") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/waitForReplicationCatchUp") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4960,16 +4312,16 @@ func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { "region": c.region, "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.waitForReplicationCatchUp", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.resize" call. +// Do executes the "compute.regionDisks.waitForReplicationCatchUp" 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 *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksWaitForReplicationCatchUpCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4999,89 +4351,189 @@ func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.resize", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.waitForReplicationCatchUp", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthCheckServicesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. +// AggregatedList: Retrieves the list of all HealthCheckService resources, +// regional and global, available to the specified project. To prevent failure, +// Google recommends that you set the `returnPartialSuccess` parameter to +// `true`. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { - c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *RegionHealthCheckServicesService) AggregatedList(project string) *RegionHealthCheckServicesAggregatedListCall { + c := &RegionHealthCheckServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionHealthCheckServicesAggregatedListCall) Filter(filter string) *RegionHealthCheckServicesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *RegionHealthCheckServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionHealthCheckServicesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionHealthCheckServicesAggregatedListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionHealthCheckServicesAggregatedListCall) OrderBy(orderBy string) *RegionHealthCheckServicesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionHealthCheckServicesAggregatedListCall) PageToken(pageToken string) *RegionHealthCheckServicesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionHealthCheckServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthCheckServicesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *RegionHealthCheckServicesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionHealthCheckServicesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) 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 *RegionDisksSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksSetIamPolicyCall { +func (c *RegionHealthCheckServicesAggregatedListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesAggregatedListCall { 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 *RegionHealthCheckServicesAggregatedListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetIamPolicyCall) Context(ctx context.Context) *RegionDisksSetIamPolicyCall { +func (c *RegionHealthCheckServicesAggregatedListCall) Context(ctx context.Context) *RegionHealthCheckServicesAggregatedListCall { 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 *RegionDisksSetIamPolicyCall) Header() http.Header { +func (c *RegionHealthCheckServicesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) - if err != nil { - return nil, err +func (c *RegionHealthCheckServicesAggregatedListCall) 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, "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthCheckServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.aggregatedList", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.setIamPolicy" call. +// Do executes the "compute.regionHealthCheckServices.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.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 *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *HealthCheckServiceAggregatedList.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 *RegionHealthCheckServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServiceAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5100,7 +4552,7 @@ func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &HealthCheckServiceAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5111,32 +4563,52 @@ func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.aggregatedList", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *RegionHealthCheckServicesAggregatedListCall) Pages(ctx context.Context, f func(*HealthCheckServiceAggregatedList) 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) + } } -// SetLabels: Sets the labels on the target regional disk. +type RegionHealthCheckServicesDeleteCall struct { + s *Service + project string + region string + healthCheckService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified regional HealthCheckService. // -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { - c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheckService: Name of the HealthCheckService to delete. The name +// must be 1-63 characters long, and comply with RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthCheckServicesService) Delete(project string, region string, healthCheckService string) *RegionHealthCheckServicesDeleteCall { + c := &RegionHealthCheckServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest + c.healthCheckService = healthCheckService return c } @@ -5150,7 +4622,7 @@ func (r *RegionDisksService) SetLabels(project string, region string, resource s // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLabelsCall { +func (c *RegionHealthCheckServicesDeleteCall) RequestId(requestId string) *RegionHealthCheckServicesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -5158,56 +4630,52 @@ func (c *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksSetLabelsCall) Fields(s ...googleapi.Field) *RegionDisksSetLabelsCall { +func (c *RegionHealthCheckServicesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetLabelsCall) Context(ctx context.Context) *RegionDisksSetLabelsCall { +func (c *RegionHealthCheckServicesDeleteCall) Context(ctx context.Context) *RegionHealthCheckServicesDeleteCall { 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 *RegionDisksSetLabelsCall) Header() http.Header { +func (c *RegionHealthCheckServicesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err - } +func (c *RegionHealthCheckServicesDeleteCall) 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, "projects/{project}/regions/{region}/disks/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "healthCheckService": c.healthCheckService, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.setLabels" call. +// Do executes the "compute.regionHealthCheckServices.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 *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthCheckServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5237,104 +4705,96 @@ func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.setLabels", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksStartAsyncReplicationCall struct { - s *Service - project string - region string - disk string - regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthCheckServicesGetCall struct { + s *Service + project string + region string + healthCheckService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StartAsyncReplication: Starts asynchronous replication. Must be invoked on -// the primary disk. +// Get: Returns the specified regional HealthCheckService resource. // -// - disk: The name of the persistent disk. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StartAsyncReplication(project string, region string, disk string, regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest) *RegionDisksStartAsyncReplicationCall { - c := &RegionDisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheckService: Name of the HealthCheckService to update. The name +// must be 1-63 characters long, and comply with RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthCheckServicesService) Get(project string, region string, healthCheckService string) *RegionHealthCheckServicesGetCall { + c := &RegionHealthCheckServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk - c.regiondisksstartasyncreplicationrequest = regiondisksstartasyncreplicationrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksStartAsyncReplicationCall) RequestId(requestId string) *RegionDisksStartAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) + c.healthCheckService = healthCheckService 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 *RegionDisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStartAsyncReplicationCall { +func (c *RegionHealthCheckServicesGetCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesGetCall { 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 *RegionHealthCheckServicesGetCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionDisksStartAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStartAsyncReplicationCall { +func (c *RegionHealthCheckServicesGetCall) Context(ctx context.Context) *RegionHealthCheckServicesGetCall { 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 *RegionDisksStartAsyncReplicationCall) Header() http.Header { +func (c *RegionHealthCheckServicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regiondisksstartasyncreplicationrequest) - if err != nil { - return nil, err +func (c *RegionHealthCheckServicesGetCall) 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, "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "healthCheckService": c.healthCheckService, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.startAsyncReplication" call. +// Do executes the "compute.regionHealthCheckServices.get" 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 *RegionDisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *HealthCheckService.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 *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*HealthCheckService, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5353,7 +4813,7 @@ func (c *RegionDisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &HealthCheckService{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5364,31 +4824,30 @@ func (c *RegionDisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.startAsyncReplication", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksStopAsyncReplicationCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthCheckServicesInsertCall struct { + s *Service + project string + region string + healthcheckservice *HealthCheckService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// StopAsyncReplication: Stops asynchronous replication. Can be invoked either -// on the primary or on the secondary disk. +// Insert: Creates a regional HealthCheckService resource in the specified +// project and region using the data included in the request. // -// - disk: The name of the persistent disk. // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StopAsyncReplication(project string, region string, disk string) *RegionDisksStopAsyncReplicationCall { - c := &RegionDisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *RegionHealthCheckServicesService) Insert(project string, region string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesInsertCall { + c := &RegionHealthCheckServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk + c.healthcheckservice = healthcheckservice return c } @@ -5402,7 +4861,7 @@ func (r *RegionDisksService) StopAsyncReplication(project string, region string, // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksStopAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopAsyncReplicationCall { +func (c *RegionHealthCheckServicesInsertCall) RequestId(requestId string) *RegionHealthCheckServicesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -5410,33 +4869,37 @@ func (c *RegionDisksStopAsyncReplicationCall) RequestId(requestId string) *Regio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopAsyncReplicationCall { +func (c *RegionHealthCheckServicesInsertCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopAsyncReplicationCall { +func (c *RegionHealthCheckServicesInsertCall) Context(ctx context.Context) *RegionHealthCheckServicesInsertCall { 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 *RegionDisksStopAsyncReplicationCall) Header() http.Header { +func (c *RegionHealthCheckServicesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionHealthCheckServicesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheckservice) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -5444,18 +4907,17 @@ func (c *RegionDisksStopAsyncReplicationCall) doRequest(alt string) (*http.Respo googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "disk": c.disk, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.stopAsyncReplication" call. +// Do executes the "compute.regionHealthCheckServices.insert" 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 *RegionDisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthCheckServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5485,83 +4947,151 @@ func (c *RegionDisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopAsyncReplication", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksStopGroupAsyncReplicationCall struct { - s *Service - project string - region string - disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthCheckServicesListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the HealthCheckService resources that have been configured +// for the specified project in the given region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthCheckServicesService) List(project string, region string) *RegionHealthCheckServicesListCall { + c := &RegionHealthCheckServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionHealthCheckServicesListCall) Filter(filter string) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionHealthCheckServicesListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionHealthCheckServicesListCall) OrderBy(orderBy string) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// StopGroupAsyncReplication: Stops asynchronous replication for a consistency -// group of disks. Can be invoked either in the primary or secondary scope. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. This must be the region -// of the primary or secondary disks in the consistency group. -func (r *RegionDisksService) StopGroupAsyncReplication(project string, region string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *RegionDisksStopGroupAsyncReplicationCall { - c := &RegionDisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionHealthCheckServicesListCall) PageToken(pageToken string) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksStopGroupAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopGroupAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionHealthCheckServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthCheckServicesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *RegionDisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopGroupAsyncReplicationCall { +func (c *RegionHealthCheckServicesListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesListCall { 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 *RegionHealthCheckServicesListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopGroupAsyncReplicationCall { +func (c *RegionHealthCheckServicesListCall) Context(ctx context.Context) *RegionHealthCheckServicesListCall { 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 *RegionDisksStopGroupAsyncReplicationCall) Header() http.Header { +func (c *RegionHealthCheckServicesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disksstopgroupasyncreplicationresource) - if err != nil { - return nil, err +func (c *RegionHealthCheckServicesListCall) 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, "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -5570,16 +5100,17 @@ func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http. "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.stopGroupAsyncReplication" call. +// Do executes the "compute.regionHealthCheckServices.list" 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 *RegionDisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *HealthCheckServicesList.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 *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServicesList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5598,7 +5129,7 @@ func (c *RegionDisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &HealthCheckServicesList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5609,90 +5140,127 @@ func (c *RegionDisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOpti if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.stopGroupAsyncReplication", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.list", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *RegionHealthCheckServicesListCall) Pages(ctx context.Context, f func(*HealthCheckServicesList) 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) + } } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +type RegionHealthCheckServicesPatchCall struct { + s *Service + project string + region string + healthCheckService string + healthcheckservice *HealthCheckService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified regional HealthCheckService resource with the +// data included in the request. This method supports PATCH semantics and uses +// the JSON merge patch format and processing rules. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { - c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheckService: Name of the HealthCheckService to update. The name +// must be 1-63 characters long, and comply with RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthCheckServicesService) Patch(project string, region string, healthCheckService string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesPatchCall { + c := &RegionHealthCheckServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.healthCheckService = healthCheckService + c.healthcheckservice = healthcheckservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionHealthCheckServicesPatchCall) RequestId(requestId string) *RegionHealthCheckServicesPatchCall { + c.urlParams_.Set("requestId", requestId) 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 *RegionDisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionDisksTestIamPermissionsCall { +func (c *RegionHealthCheckServicesPatchCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksTestIamPermissionsCall) Context(ctx context.Context) *RegionDisksTestIamPermissionsCall { +func (c *RegionHealthCheckServicesPatchCall) Context(ctx context.Context) *RegionHealthCheckServicesPatchCall { 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 *RegionDisksTestIamPermissionsCall) Header() http.Header { +func (c *RegionHealthCheckServicesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthCheckServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheckservice) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "healthCheckService": c.healthCheckService, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.testIamPermissions" call. +// Do executes the "compute.regionHealthCheckServices.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *RegionHealthCheckServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5711,7 +5279,7 @@ func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5722,118 +5290,90 @@ func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksUpdateCall struct { - s *Service - project string - region string - disk string - disk2 *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Update the specified disk with the data included in the request. -// Update is performed only on selected fields included as part of update-mask. -// Only the following fields can be modified: user_license. -// -// - disk: The disk name for this request. -// - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) Update(project string, region string, disk string, disk2 *Disk) *RegionDisksUpdateCall { - c := &RegionDisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.disk = disk - c.disk2 = disk2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *RegionDisksUpdateCall) Paths(paths ...string) *RegionDisksUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksUpdateCall) RequestId(requestId string) *RegionDisksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c +type RegionHealthCheckServicesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionDisksUpdateCall) UpdateMask(updateMask string) *RegionDisksUpdateCall { - c.urlParams_.Set("updateMask", updateMask) + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionHealthCheckServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthCheckServicesTestIamPermissionsCall { + c := &RegionHealthCheckServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *RegionDisksUpdateCall) Fields(s ...googleapi.Field) *RegionDisksUpdateCall { +func (c *RegionHealthCheckServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksUpdateCall) Context(ctx context.Context) *RegionDisksUpdateCall { +func (c *RegionHealthCheckServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthCheckServicesTestIamPermissionsCall { 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 *RegionDisksUpdateCall) Header() http.Header { +func (c *RegionHealthCheckServicesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthCheckServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.disk2) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.update" call. +// Do executes the "compute.regionHealthCheckServices.testIamPermissions" 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 *RegionDisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TestPermissionsResponse.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 *RegionHealthCheckServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5852,7 +5392,7 @@ func (c *RegionDisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5863,34 +5403,30 @@ func (c *RegionDisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionDisksWaitForReplicationCatchUpCall struct { - s *Service - project string - region string - disk string - regionwaitforreplicationcatchuprequest *RegionWaitForReplicationCatchUpRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthChecksDeleteCall struct { + s *Service + project string + region string + healthCheck string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// WaitForReplicationCatchUp: Wait for replication to catch up on the secondary -// disk. +// Delete: Deletes the specified HealthCheck resource. // -// - disk: The name of the persistent disk. Name should conform to RFC1035 or -// be an unsigned long integer. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) WaitForReplicationCatchUp(project string, region string, disk string, regionwaitforreplicationcatchuprequest *RegionWaitForReplicationCatchUpRequest) *RegionDisksWaitForReplicationCatchUpCall { - c := &RegionDisksWaitForReplicationCatchUpCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheck: Name of the HealthCheck resource to delete. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthChecksService) Delete(project string, region string, healthCheck string) *RegionHealthChecksDeleteCall { + c := &RegionHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk - c.regionwaitforreplicationcatchuprequest = regionwaitforreplicationcatchuprequest + c.healthCheck = healthCheck return c } @@ -5904,7 +5440,7 @@ func (r *RegionDisksService) WaitForReplicationCatchUp(project string, region st // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionDisksWaitForReplicationCatchUpCall) RequestId(requestId string) *RegionDisksWaitForReplicationCatchUpCall { +func (c *RegionHealthChecksDeleteCall) RequestId(requestId string) *RegionHealthChecksDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -5912,56 +5448,52 @@ func (c *RegionDisksWaitForReplicationCatchUpCall) RequestId(requestId string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksWaitForReplicationCatchUpCall) Fields(s ...googleapi.Field) *RegionDisksWaitForReplicationCatchUpCall { +func (c *RegionHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionHealthChecksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksWaitForReplicationCatchUpCall) Context(ctx context.Context) *RegionDisksWaitForReplicationCatchUpCall { +func (c *RegionHealthChecksDeleteCall) Context(ctx context.Context) *RegionHealthChecksDeleteCall { 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 *RegionDisksWaitForReplicationCatchUpCall) Header() http.Header { +func (c *RegionHealthChecksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksWaitForReplicationCatchUpCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionwaitforreplicationcatchuprequest) - if err != nil { - return nil, err - } +func (c *RegionHealthChecksDeleteCall) 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, "projects/{project}/regions/{region}/disks/{disk}/waitForReplicationCatchUp") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionDisks.waitForReplicationCatchUp", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.waitForReplicationCatchUp" call. +// Do executes the "compute.regionHealthChecks.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 *RegionDisksWaitForReplicationCatchUpCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5991,134 +5523,38 @@ func (c *RegionDisksWaitForReplicationCatchUpCall) Do(opts ...googleapi.CallOpti if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionDisks.waitForReplicationCatchUp", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionHealthCheckServicesAggregatedListCall struct { +type RegionHealthChecksGetCall struct { s *Service project string + region string + healthCheck string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves the list of all HealthCheckService resources, -// regional and global, available to the specified project. To prevent failure, -// Google recommends that you set the `returnPartialSuccess` parameter to -// `true`. +// Get: Returns the specified HealthCheck resource. // -// - project: Name of the project scoping this request. -func (r *RegionHealthCheckServicesService) AggregatedList(project string) *RegionHealthCheckServicesAggregatedListCall { - c := &RegionHealthCheckServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheck: Name of the HealthCheck resource to return. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthChecksService) Get(project string, region string, healthCheck string) *RegionHealthChecksGetCall { + c := &RegionHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionHealthCheckServicesAggregatedListCall) Filter(filter string) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *RegionHealthCheckServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthCheckServicesAggregatedListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionHealthCheckServicesAggregatedListCall) OrderBy(orderBy string) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionHealthCheckServicesAggregatedListCall) PageToken(pageToken string) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionHealthCheckServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *RegionHealthCheckServicesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionHealthCheckServicesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + c.region = region + c.healthCheck = healthCheck 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 *RegionHealthCheckServicesAggregatedListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesAggregatedListCall { +func (c *RegionHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionHealthChecksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6126,34 +5562,34 @@ func (c *RegionHealthCheckServicesAggregatedListCall) Fields(s ...googleapi.Fiel // 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 *RegionHealthCheckServicesAggregatedListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesAggregatedListCall { +func (c *RegionHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionHealthChecksGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesAggregatedListCall) Context(ctx context.Context) *RegionHealthCheckServicesAggregatedListCall { +func (c *RegionHealthChecksGetCall) Context(ctx context.Context) *RegionHealthChecksGetCall { 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 *RegionHealthCheckServicesAggregatedListCall) Header() http.Header { +func (c *RegionHealthChecksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthChecksGetCall) 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, "projects/{project}/aggregated/healthCheckServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -6161,19 +5597,20 @@ func (c *RegionHealthCheckServicesAggregatedListCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.aggregatedList", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.aggregatedList" call. +// Do executes the "compute.regionHealthChecks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheckServiceAggregatedList.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 *RegionHealthCheckServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServiceAggregatedList, error) { +// *HealthCheck.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 *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6192,7 +5629,7 @@ func (c *RegionHealthCheckServicesAggregatedListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheckServiceAggregatedList{ + ret := &HealthCheck{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6203,52 +5640,30 @@ func (c *RegionHealthCheckServicesAggregatedListCall) Do(opts ...googleapi.CallO if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.aggregatedList", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.get", "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 *RegionHealthCheckServicesAggregatedListCall) Pages(ctx context.Context, f func(*HealthCheckServiceAggregatedList) 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 RegionHealthCheckServicesDeleteCall struct { - s *Service - project string - region string - healthCheckService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthChecksInsertCall struct { + s *Service + project string + region string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified regional HealthCheckService. +// Insert: Creates a HealthCheck resource in the specified project using the +// data included in the request. // -// - healthCheckService: Name of the HealthCheckService to delete. The name -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Delete(project string, region string, healthCheckService string) *RegionHealthCheckServicesDeleteCall { - c := &RegionHealthCheckServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthChecksService) Insert(project string, region string, healthcheck *HealthCheck) *RegionHealthChecksInsertCall { + c := &RegionHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheckService = healthCheckService + c.healthcheck = healthcheck return c } @@ -6262,7 +5677,7 @@ func (r *RegionHealthCheckServicesService) Delete(project string, region string, // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionHealthCheckServicesDeleteCall) RequestId(requestId string) *RegionHealthCheckServicesDeleteCall { +func (c *RegionHealthChecksInsertCall) RequestId(requestId string) *RegionHealthChecksInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -6270,52 +5685,55 @@ func (c *RegionHealthCheckServicesDeleteCall) RequestId(requestId string) *Regio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthCheckServicesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesDeleteCall { +func (c *RegionHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionHealthChecksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesDeleteCall) Context(ctx context.Context) *RegionHealthCheckServicesDeleteCall { +func (c *RegionHealthChecksInsertCall) Context(ctx context.Context) *RegionHealthChecksInsertCall { 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 *RegionHealthCheckServicesDeleteCall) Header() http.Header { +func (c *RegionHealthChecksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, + "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.delete" call. +// Do executes the "compute.regionHealthChecks.insert" 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 *RegionHealthCheckServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6345,39 +5763,114 @@ func (c *RegionHealthCheckServicesDeleteCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionHealthCheckServicesGetCall struct { - s *Service - project string - region string - healthCheckService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionHealthChecksListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified regional HealthCheckService resource. +// List: Retrieves the list of HealthCheck resources available to the specified +// project. // -// - healthCheckService: Name of the HealthCheckService to update. The name -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Get(project string, region string, healthCheckService string) *RegionHealthCheckServicesGetCall { - c := &RegionHealthCheckServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthChecksService) List(project string, region string) *RegionHealthChecksListCall { + c := &RegionHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheckService = healthCheckService + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionHealthChecksListCall) Filter(filter string) *RegionHealthChecksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionHealthChecksListCall) MaxResults(maxResults int64) *RegionHealthChecksListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionHealthChecksListCall) OrderBy(orderBy string) *RegionHealthChecksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionHealthChecksListCall) PageToken(pageToken string) *RegionHealthChecksListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthChecksListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *RegionHealthCheckServicesGetCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesGetCall { +func (c *RegionHealthChecksListCall) Fields(s ...googleapi.Field) *RegionHealthChecksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6385,34 +5878,34 @@ func (c *RegionHealthCheckServicesGetCall) Fields(s ...googleapi.Field) *RegionH // 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 *RegionHealthCheckServicesGetCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesGetCall { +func (c *RegionHealthChecksListCall) IfNoneMatch(entityTag string) *RegionHealthChecksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesGetCall) Context(ctx context.Context) *RegionHealthCheckServicesGetCall { +func (c *RegionHealthChecksListCall) Context(ctx context.Context) *RegionHealthChecksListCall { 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 *RegionHealthCheckServicesGetCall) Header() http.Header { +func (c *RegionHealthChecksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthChecksListCall) 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, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -6420,21 +5913,20 @@ func (c *RegionHealthCheckServicesGetCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, + "project": c.project, + "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.get" call. +// Do executes the "compute.regionHealthChecks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheckService.ServerResponse.Header or (if a response was returned at +// *HealthCheckList.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 *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*HealthCheckService, error) { +func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6453,7 +5945,7 @@ func (c *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*He if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheckService{ + ret := &HealthCheckList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6464,30 +5956,55 @@ func (c *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*He if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.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 *RegionHealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) 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 RegionHealthCheckServicesInsertCall struct { - s *Service - project string - region string - healthcheckservice *HealthCheckService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthChecksPatchCall struct { + s *Service + project string + region string + healthCheck string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a regional HealthCheckService resource in the specified -// project and region using the data included in the request. +// Patch: Updates a HealthCheck resource in the specified project using the +// data included in the request. This method supports PATCH semantics and uses +// the JSON merge patch format and processing rules. // +// - healthCheck: Name of the HealthCheck resource to patch. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Insert(project string, region string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesInsertCall { - c := &RegionHealthCheckServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthChecksService) Patch(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksPatchCall { + c := &RegionHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthcheckservice = healthcheckservice + c.healthCheck = healthCheck + c.healthcheck = healthcheck return c } @@ -6501,7 +6018,7 @@ func (r *RegionHealthCheckServicesService) Insert(project string, region string, // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionHealthCheckServicesInsertCall) RequestId(requestId string) *RegionHealthCheckServicesInsertCall { +func (c *RegionHealthChecksPatchCall) RequestId(requestId string) *RegionHealthChecksPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -6509,55 +6026,56 @@ func (c *RegionHealthCheckServicesInsertCall) RequestId(requestId string) *Regio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthCheckServicesInsertCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesInsertCall { +func (c *RegionHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionHealthChecksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesInsertCall) Context(ctx context.Context) *RegionHealthCheckServicesInsertCall { +func (c *RegionHealthChecksPatchCall) Context(ctx context.Context) *RegionHealthChecksPatchCall { 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 *RegionHealthCheckServicesInsertCall) Header() http.Header { +func (c *RegionHealthChecksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheckservice) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.insert" call. +// Do executes the "compute.regionHealthChecks.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 *RegionHealthCheckServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6587,170 +6105,90 @@ func (c *RegionHealthCheckServicesInsertCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionHealthCheckServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionHealthChecksTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all the HealthCheckService resources that have been configured -// for the specified project in the given region. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) List(project string, region string) *RegionHealthCheckServicesListCall { - c := &RegionHealthCheckServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionHealthChecksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthChecksTestIamPermissionsCall { + c := &RegionHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionHealthCheckServicesListCall) Filter(filter string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthCheckServicesListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionHealthCheckServicesListCall) OrderBy(orderBy string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionHealthCheckServicesListCall) PageToken(pageToken string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionHealthCheckServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest 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 *RegionHealthCheckServicesListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesListCall { +func (c *RegionHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthChecksTestIamPermissionsCall { 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 *RegionHealthCheckServicesListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesListCall) Context(ctx context.Context) *RegionHealthCheckServicesListCall { +func (c *RegionHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthChecksTestIamPermissionsCall { 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 *RegionHealthCheckServicesListCall) Header() http.Header { +func (c *RegionHealthChecksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *RegionHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) + if err != nil { + return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.list" call. +// Do executes the "compute.regionHealthChecks.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheckServicesList.ServerResponse.Header or (if a response was +// *TestPermissionsResponse.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 *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServicesList, error) { +func (c *RegionHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6769,7 +6207,7 @@ func (c *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*H if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheckServicesList{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6780,56 +6218,33 @@ func (c *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*H if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.testIamPermissions", "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 *RegionHealthCheckServicesListCall) Pages(ctx context.Context, f func(*HealthCheckServicesList) 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 RegionHealthCheckServicesPatchCall struct { - s *Service - project string - region string - healthCheckService string - healthcheckservice *HealthCheckService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthChecksUpdateCall struct { + s *Service + project string + region string + healthCheck string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified regional HealthCheckService resource with the -// data included in the request. This method supports PATCH semantics and uses -// the JSON merge patch format and processing rules. +// Update: Updates a HealthCheck resource in the specified project using the +// data included in the request. // -// - healthCheckService: Name of the HealthCheckService to update. The name -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Patch(project string, region string, healthCheckService string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesPatchCall { - c := &RegionHealthCheckServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheck: Name of the HealthCheck resource to update. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthChecksService) Update(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksUpdateCall { + c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheckService = healthCheckService - c.healthcheckservice = healthcheckservice + c.healthCheck = healthCheck + c.healthcheck = healthcheck return c } @@ -6843,7 +6258,7 @@ func (r *RegionHealthCheckServicesService) Patch(project string, region string, // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionHealthCheckServicesPatchCall) RequestId(requestId string) *RegionHealthCheckServicesPatchCall { +func (c *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealthChecksUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -6851,56 +6266,56 @@ func (c *RegionHealthCheckServicesPatchCall) RequestId(requestId string) *Region // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthCheckServicesPatchCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesPatchCall { +func (c *RegionHealthChecksUpdateCall) Fields(s ...googleapi.Field) *RegionHealthChecksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesPatchCall) Context(ctx context.Context) *RegionHealthCheckServicesPatchCall { +func (c *RegionHealthChecksUpdateCall) Context(ctx context.Context) *RegionHealthChecksUpdateCall { 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 *RegionHealthCheckServicesPatchCall) Header() http.Header { +func (c *RegionHealthChecksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheckservice) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.patch" call. +// Do executes the "compute.regionHealthChecks.update" 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 *RegionHealthCheckServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6930,90 +6345,188 @@ func (c *RegionHealthCheckServicesPatchCall) Do(opts ...googleapi.CallOption) (* if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.update", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionHealthCheckServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthSourcesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// AggregatedList: Retrieves the list of all HealthSource resources (all +// regional) available to the specified project. To prevent failure, Google +// recommends that you set the `returnPartialSuccess` parameter to `true`. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionHealthCheckServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthCheckServicesTestIamPermissionsCall { - c := &RegionHealthCheckServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *RegionHealthSourcesService) AggregatedList(project string) *RegionHealthSourcesAggregatedListCall { + c := &RegionHealthSourcesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionHealthSourcesAggregatedListCall) Filter(filter string) *RegionHealthSourcesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *RegionHealthSourcesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionHealthSourcesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionHealthSourcesAggregatedListCall) MaxResults(maxResults int64) *RegionHealthSourcesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionHealthSourcesAggregatedListCall) OrderBy(orderBy string) *RegionHealthSourcesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionHealthSourcesAggregatedListCall) PageToken(pageToken string) *RegionHealthSourcesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionHealthSourcesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthSourcesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *RegionHealthSourcesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionHealthSourcesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) 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 *RegionHealthCheckServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesTestIamPermissionsCall { +func (c *RegionHealthSourcesAggregatedListCall) Fields(s ...googleapi.Field) *RegionHealthSourcesAggregatedListCall { 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 *RegionHealthSourcesAggregatedListCall) IfNoneMatch(entityTag string) *RegionHealthSourcesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthCheckServicesTestIamPermissionsCall { +func (c *RegionHealthSourcesAggregatedListCall) Context(ctx context.Context) *RegionHealthSourcesAggregatedListCall { 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 *RegionHealthCheckServicesTestIamPermissionsCall) Header() http.Header { +func (c *RegionHealthSourcesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err +func (c *RegionHealthSourcesAggregatedListCall) 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, "projects/{project}/regions/{region}/healthCheckServices/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/healthSources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.aggregatedList", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.testIamPermissions" call. +// Do executes the "compute.regionHealthSources.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// *HealthSourceAggregatedList.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 *RegionHealthCheckServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *RegionHealthSourcesAggregatedListCall) Do(opts ...googleapi.CallOption) (*HealthSourceAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7032,7 +6545,7 @@ func (c *RegionHealthCheckServicesTestIamPermissionsCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &HealthSourceAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7043,30 +6556,51 @@ func (c *RegionHealthCheckServicesTestIamPermissionsCall) Do(opts ...googleapi.C if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthCheckServices.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.aggregatedList", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionHealthChecksDeleteCall struct { - s *Service - project string - region string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *RegionHealthSourcesAggregatedListCall) Pages(ctx context.Context, f func(*HealthSourceAggregatedList) 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) + } } -// Delete: Deletes the specified HealthCheck resource. +type RegionHealthSourcesDeleteCall struct { + s *Service + project string + region string + healthSource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified HealthSource in the given region // -// - healthCheck: Name of the HealthCheck resource to delete. +// - healthSource: Name of the HealthSource resource to delete. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Delete(project string, region string, healthCheck string) *RegionHealthChecksDeleteCall { - c := &RegionHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthSourcesService) Delete(project string, region string, healthSource string) *RegionHealthSourcesDeleteCall { + c := &RegionHealthSourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheck = healthCheck + c.healthSource = healthSource return c } @@ -7080,7 +6614,7 @@ func (r *RegionHealthChecksService) Delete(project string, region string, health // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionHealthChecksDeleteCall) RequestId(requestId string) *RegionHealthChecksDeleteCall { +func (c *RegionHealthSourcesDeleteCall) RequestId(requestId string) *RegionHealthSourcesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -7088,31 +6622,31 @@ func (c *RegionHealthChecksDeleteCall) RequestId(requestId string) *RegionHealth // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionHealthChecksDeleteCall { +func (c *RegionHealthSourcesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthSourcesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksDeleteCall) Context(ctx context.Context) *RegionHealthChecksDeleteCall { +func (c *RegionHealthSourcesDeleteCall) Context(ctx context.Context) *RegionHealthSourcesDeleteCall { 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 *RegionHealthChecksDeleteCall) Header() http.Header { +func (c *RegionHealthSourcesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthSourcesDeleteCall) 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, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{healthSource}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, nil) if err != nil { @@ -7120,20 +6654,20 @@ func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, + "project": c.project, + "region": c.region, + "healthSource": c.healthSource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.delete", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.delete", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.delete" call. +// Do executes the "compute.regionHealthSources.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 *RegionHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthSourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7163,38 +6697,38 @@ func (c *RegionHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operat if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.delete", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.delete", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionHealthChecksGetCall struct { +type RegionHealthSourcesGetCall struct { s *Service project string region string - healthCheck string + healthSource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified HealthCheck resource. +// Get: Returns the specified HealthSource resource in the given region. // -// - healthCheck: Name of the HealthCheck resource to return. +// - healthSource: Name of the HealthSource resource to return. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Get(project string, region string, healthCheck string) *RegionHealthChecksGetCall { - c := &RegionHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *RegionHealthSourcesService) Get(project string, region string, healthSource string) *RegionHealthSourcesGetCall { + c := &RegionHealthSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheck = healthCheck + c.healthSource = healthSource 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 *RegionHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionHealthChecksGetCall { +func (c *RegionHealthSourcesGetCall) Fields(s ...googleapi.Field) *RegionHealthSourcesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7202,34 +6736,34 @@ func (c *RegionHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionHealthCh // 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 *RegionHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionHealthChecksGetCall { +func (c *RegionHealthSourcesGetCall) IfNoneMatch(entityTag string) *RegionHealthSourcesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksGetCall) Context(ctx context.Context) *RegionHealthChecksGetCall { +func (c *RegionHealthSourcesGetCall) Context(ctx context.Context) *RegionHealthSourcesGetCall { 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 *RegionHealthChecksGetCall) Header() http.Header { +func (c *RegionHealthSourcesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthSourcesGetCall) 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, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{healthSource}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -7237,20 +6771,20 @@ func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, + "project": c.project, + "region": c.region, + "healthSource": c.healthSource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.get", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.get" call. +// Do executes the "compute.regionHealthSources.get" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheck.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *HealthSource.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 *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { +func (c *RegionHealthSourcesGetCall) Do(opts ...googleapi.CallOption) (*HealthSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7269,7 +6803,7 @@ func (c *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthChe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheck{ + ret := &HealthSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7280,30 +6814,30 @@ func (c *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthChe if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.get", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionHealthChecksInsertCall struct { - s *Service - project string - region string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthSourcesInsertCall struct { + s *Service + project string + region string + healthsource *HealthSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a HealthCheck resource in the specified project using the -// data included in the request. +// Insert: Create a HealthSource in the specified project in the given region +// using the parameters that are included in the request. // // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Insert(project string, region string, healthcheck *HealthCheck) *RegionHealthChecksInsertCall { - c := &RegionHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthSourcesService) Insert(project string, region string, healthsource *HealthSource) *RegionHealthSourcesInsertCall { + c := &RegionHealthSourcesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthcheck = healthcheck + c.healthsource = healthsource return c } @@ -7317,7 +6851,7 @@ func (r *RegionHealthChecksService) Insert(project string, region string, health // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionHealthChecksInsertCall) RequestId(requestId string) *RegionHealthChecksInsertCall { +func (c *RegionHealthSourcesInsertCall) RequestId(requestId string) *RegionHealthSourcesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -7325,35 +6859,35 @@ func (c *RegionHealthChecksInsertCall) RequestId(requestId string) *RegionHealth // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionHealthChecksInsertCall { +func (c *RegionHealthSourcesInsertCall) Fields(s ...googleapi.Field) *RegionHealthSourcesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksInsertCall) Context(ctx context.Context) *RegionHealthChecksInsertCall { +func (c *RegionHealthSourcesInsertCall) Context(ctx context.Context) *RegionHealthSourcesInsertCall { 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 *RegionHealthChecksInsertCall) Header() http.Header { +func (c *RegionHealthSourcesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthSourcesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthsource) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -7364,16 +6898,16 @@ func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, er "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.insert", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.insert", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.insert" call. +// Do executes the "compute.regionHealthSources.insert" 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 *RegionHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthSourcesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7403,11 +6937,11 @@ func (c *RegionHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operat if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.insert", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.insert", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionHealthChecksListCall struct { +type RegionHealthSourcesListCall struct { s *Service project string region string @@ -7417,13 +6951,12 @@ type RegionHealthChecksListCall struct { header_ http.Header } -// List: Retrieves the list of HealthCheck resources available to the specified -// project. +// List: Lists the HealthSources for a project in the given region. // // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) List(project string, region string) *RegionHealthChecksListCall { - c := &RegionHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthSourcesService) List(project string, region string) *RegionHealthSourcesListCall { + c := &RegionHealthSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -7461,7 +6994,7 @@ func (r *RegionHealthChecksService) List(project string, region string) *RegionH // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionHealthChecksListCall) Filter(filter string) *RegionHealthChecksListCall { +func (c *RegionHealthSourcesListCall) Filter(filter string) *RegionHealthSourcesListCall { c.urlParams_.Set("filter", filter) return c } @@ -7471,7 +7004,7 @@ func (c *RegionHealthChecksListCall) Filter(filter string) *RegionHealthChecksLi // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthChecksListCall) MaxResults(maxResults int64) *RegionHealthChecksListCall { +func (c *RegionHealthSourcesListCall) MaxResults(maxResults int64) *RegionHealthSourcesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -7484,7 +7017,7 @@ func (c *RegionHealthChecksListCall) MaxResults(maxResults int64) *RegionHealthC // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionHealthChecksListCall) OrderBy(orderBy string) *RegionHealthChecksListCall { +func (c *RegionHealthSourcesListCall) OrderBy(orderBy string) *RegionHealthSourcesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -7492,7 +7025,7 @@ func (c *RegionHealthChecksListCall) OrderBy(orderBy string) *RegionHealthChecks // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionHealthChecksListCall) PageToken(pageToken string) *RegionHealthChecksListCall { +func (c *RegionHealthSourcesListCall) PageToken(pageToken string) *RegionHealthSourcesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -7502,7 +7035,7 @@ func (c *RegionHealthChecksListCall) PageToken(pageToken string) *RegionHealthCh // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthChecksListCall { +func (c *RegionHealthSourcesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthSourcesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -7510,7 +7043,7 @@ func (c *RegionHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess b // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksListCall) Fields(s ...googleapi.Field) *RegionHealthChecksListCall { +func (c *RegionHealthSourcesListCall) Fields(s ...googleapi.Field) *RegionHealthSourcesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -7518,34 +7051,34 @@ func (c *RegionHealthChecksListCall) Fields(s ...googleapi.Field) *RegionHealthC // 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 *RegionHealthChecksListCall) IfNoneMatch(entityTag string) *RegionHealthChecksListCall { +func (c *RegionHealthSourcesListCall) IfNoneMatch(entityTag string) *RegionHealthSourcesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksListCall) Context(ctx context.Context) *RegionHealthChecksListCall { +func (c *RegionHealthSourcesListCall) Context(ctx context.Context) *RegionHealthSourcesListCall { 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 *RegionHealthChecksListCall) Header() http.Header { +func (c *RegionHealthSourcesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthSourcesListCall) 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, "projects/{project}/regions/{region}/healthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, nil) if err != nil { @@ -7556,17 +7089,17 @@ func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, erro "project": c.project, "region": c.region, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.list", "request", internallog.HTTPRequest(req, nil)) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.list" call. +// Do executes the "compute.regionHealthSources.list" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheckList.ServerResponse.Header or (if a response was returned at +// *HealthSourceList.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 *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { +func (c *RegionHealthSourcesListCall) Do(opts ...googleapi.CallOption) (*HealthSourceList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7585,7 +7118,7 @@ func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCh if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheckList{ + ret := &HealthSourceList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7596,14 +7129,14 @@ func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCh if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.list", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.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 *RegionHealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { +func (c *RegionHealthSourcesListCall) Pages(ctx context.Context, f func(*HealthSourceList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -7621,30 +7154,31 @@ func (c *RegionHealthChecksListCall) Pages(ctx context.Context, f func(*HealthCh } } -type RegionHealthChecksPatchCall struct { - s *Service - project string - region string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthSourcesPatchCall struct { + s *Service + project string + region string + healthSource string + healthsource *HealthSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a HealthCheck resource in the specified project using the -// data included in the request. This method supports PATCH semantics and uses -// the JSON merge patch format and processing rules. +// Patch: Updates the specified regional HealthSource resource with the data +// included in the request. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. // -// - healthCheck: Name of the HealthCheck resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Patch(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksPatchCall { - c := &RegionHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthSource: Name of the HealthSource to update. The name must be 1-63 +// characters long, and comply with RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthSourcesService) Patch(project string, region string, healthSource string, healthsource *HealthSource) *RegionHealthSourcesPatchCall { + c := &RegionHealthSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheck = healthCheck - c.healthcheck = healthcheck + c.healthSource = healthSource + c.healthsource = healthsource return c } @@ -7658,7 +7192,7 @@ func (r *RegionHealthChecksService) Patch(project string, region string, healthC // prevents clients from accidentally creating duplicate commitments. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionHealthChecksPatchCall) RequestId(requestId string) *RegionHealthChecksPatchCall { +func (c *RegionHealthSourcesPatchCall) RequestId(requestId string) *RegionHealthSourcesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -7666,35 +7200,35 @@ func (c *RegionHealthChecksPatchCall) RequestId(requestId string) *RegionHealthC // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionHealthChecksPatchCall { +func (c *RegionHealthSourcesPatchCall) Fields(s ...googleapi.Field) *RegionHealthSourcesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksPatchCall) Context(ctx context.Context) *RegionHealthChecksPatchCall { +func (c *RegionHealthSourcesPatchCall) Context(ctx context.Context) *RegionHealthSourcesPatchCall { 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 *RegionHealthChecksPatchCall) Header() http.Header { +func (c *RegionHealthSourcesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthSourcesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthsource) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{healthSource}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -7702,20 +7236,20 @@ func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, + "project": c.project, + "region": c.region, + "healthSource": c.healthSource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.patch", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.patch", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.patch" call. +// Do executes the "compute.regionHealthSources.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 *RegionHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7745,11 +7279,11 @@ func (c *RegionHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operati if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.patch", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.patch", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionHealthChecksTestIamPermissionsCall struct { +type RegionHealthSourcesTestIamPermissionsCall struct { s *Service project string region string @@ -7766,8 +7300,8 @@ type RegionHealthChecksTestIamPermissionsCall struct { // - project: Project ID for this request. // - region: The name of the region for this request. // - resource: Name or id of the resource for this request. -func (r *RegionHealthChecksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthChecksTestIamPermissionsCall { - c := &RegionHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthSourcesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionHealthSourcesTestIamPermissionsCall { + c := &RegionHealthSourcesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.resource = resource @@ -7778,27 +7312,27 @@ func (r *RegionHealthChecksService) TestIamPermissions(project string, region st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthChecksTestIamPermissionsCall { +func (c *RegionHealthSourcesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionHealthSourcesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthChecksTestIamPermissionsCall { +func (c *RegionHealthSourcesTestIamPermissionsCall) Context(ctx context.Context) *RegionHealthSourcesTestIamPermissionsCall { 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 *RegionHealthChecksTestIamPermissionsCall) Header() http.Header { +func (c *RegionHealthSourcesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthSourcesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) if err != nil { @@ -7806,156 +7340,29 @@ func (c *RegionHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http. } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthSources/{resource}/testIamPermissions") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionHealthChecks.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ - 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", "compute.regionHealthChecks.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type RegionHealthChecksUpdateCall struct { - s *Service - project string - region string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a HealthCheck resource in the specified project using the -// data included in the request. -// -// - healthCheck: Name of the HealthCheck resource to update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Update(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksUpdateCall { - c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.healthCheck = healthCheck - c.healthcheck = healthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealthChecksUpdateCall { - c.urlParams_.Set("requestId", requestId) - 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 *RegionHealthChecksUpdateCall) Fields(s ...googleapi.Field) *RegionHealthChecksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksUpdateCall) Context(ctx context.Context) *RegionHealthChecksUpdateCall { - 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 *RegionHealthChecksUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.healthcheck) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.update", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionHealthSources.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.update" call. +// Do executes the "compute.regionHealthSources.testIamPermissions" 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 *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TestPermissionsResponse.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 *RegionHealthSourcesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7974,7 +7381,7 @@ func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7985,7 +7392,7 @@ func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operat if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthChecks.update", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionHealthSources.testIamPermissions", "response", internallog.HTTPResponse(res, b)) return ret, nil } @@ -15771,13 +15178,252 @@ func (c *RegionInstantSnapshotsSetIamPolicyCall) Header() http.Header { func (c *RegionInstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshots.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *Policy.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 *RegionInstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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 := &Policy{ + 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", "compute.regionInstantSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionInstantSnapshotsSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on a instantSnapshot in the given region. To +// learn more about labels, read the Labeling Resources documentation. +// +// - project: Project ID for this request. +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionInstantSnapshotsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionInstantSnapshotsSetLabelsCall { + c := &RegionInstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionInstantSnapshotsSetLabelsCall) RequestId(requestId string) *RegionInstantSnapshotsSetLabelsCall { + c.urlParams_.Set("requestId", requestId) + 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 *RegionInstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstantSnapshotsSetLabelsCall) Context(ctx context.Context) *RegionInstantSnapshotsSetLabelsCall { + 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 *RegionInstantSnapshotsSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshots.setLabels" 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 *RegionInstantSnapshotsSetLabelsCall) 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", "compute.regionInstantSnapshots.setLabels", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type RegionInstantSnapshotsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionInstantSnapshotsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstantSnapshotsTestIamPermissionsCall { + c := &RegionInstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + 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 *RegionInstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstantSnapshotsTestIamPermissionsCall { + 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 *RegionInstantSnapshotsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15789,16 +15435,17 @@ func (c *RegionInstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Re "region": c.region, "resource": c.resource, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstantSnapshots.setIamPolicy" call. +// Do executes the "compute.regionInstantSnapshots.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Policy.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 *RegionInstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *TestPermissionsResponse.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 *RegionInstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15817,7 +15464,7 @@ func (c *RegionInstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15828,104 +15475,101 @@ func (c *RegionInstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setIamPolicy", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionInstantSnapshotsSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionMultiMigMembersGetCall struct { + s *Service + project string + region string + multiMig string + multiMigMember string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on a instantSnapshot in the given region. To -// learn more about labels, read the Labeling Resources documentation. +// Get: Retrieves information about the specified multi-MIG member. // -// - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionInstantSnapshotsSetLabelsCall { - c := &RegionInstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - multiMig: The name of the multi-MIG. Name should conform to RFC1035 or be +// a resource ID. +// - multiMigMember: The name of the multi-MIG member. Name should conform to +// RFC1035 or be a resource ID. +// - project: Project ID for this request. +// - region: Name of the region for this request. Region name should conform to +// RFC1035. +func (r *RegionMultiMigMembersService) Get(project string, region string, multiMig string, multiMigMember string) *RegionMultiMigMembersGetCall { + c := &RegionMultiMigMembersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstantSnapshotsSetLabelsCall) RequestId(requestId string) *RegionInstantSnapshotsSetLabelsCall { - c.urlParams_.Set("requestId", requestId) + c.multiMig = multiMig + c.multiMigMember = multiMigMember 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 *RegionInstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsSetLabelsCall { +func (c *RegionMultiMigMembersGetCall) Fields(s ...googleapi.Field) *RegionMultiMigMembersGetCall { 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 *RegionMultiMigMembersGetCall) IfNoneMatch(entityTag string) *RegionMultiMigMembersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsSetLabelsCall) Context(ctx context.Context) *RegionInstantSnapshotsSetLabelsCall { +func (c *RegionMultiMigMembersGetCall) Context(ctx context.Context) *RegionMultiMigMembersGetCall { 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 *RegionInstantSnapshotsSetLabelsCall) Header() http.Header { +func (c *RegionMultiMigMembersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.regionsetlabelsrequest) - if err != nil { - return nil, err +func (c *RegionMultiMigMembersGetCall) 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, "projects/{project}/regions/{region}/instantSnapshots/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers/{multiMigMember}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "multiMig": c.multiMig, + "multiMigMember": c.multiMigMember, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setLabels", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigMembers.get", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstantSnapshots.setLabels" call. +// Do executes the "compute.regionMultiMigMembers.get" 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 +// *MultiMigMember.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 *RegionInstantSnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionMultiMigMembersGetCall) Do(opts ...googleapi.CallOption) (*MultiMigMember, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15944,7 +15588,7 @@ func (c *RegionInstantSnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &MultiMigMember{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15955,70 +15599,155 @@ func (c *RegionInstantSnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) ( if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.setLabels", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigMembers.get", "response", internallog.HTTPResponse(res, b)) return ret, nil } -type RegionInstantSnapshotsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionMultiMigMembersListCall struct { + s *Service + project string + region string + multiMig string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// List: Retrieves a list of members of a specific multi-MIG. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionInstantSnapshotsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstantSnapshotsTestIamPermissionsCall { - c := &RegionInstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - multiMig: The name of the multi-MIG. Name should conform to RFC1035 or be +// a resource ID. +// - project: Project ID for this request. +// - region: Name of the region for this request. Region name should conform to +// RFC1035. +func (r *RegionMultiMigMembersService) List(project string, region string, multiMig string) *RegionMultiMigMembersListCall { + c := &RegionMultiMigMembersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.multiMig = multiMig + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionMultiMigMembersListCall) Filter(filter string) *RegionMultiMigMembersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionMultiMigMembersListCall) MaxResults(maxResults int64) *RegionMultiMigMembersListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionMultiMigMembersListCall) OrderBy(orderBy string) *RegionMultiMigMembersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionMultiMigMembersListCall) PageToken(pageToken string) *RegionMultiMigMembersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionMultiMigMembersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionMultiMigMembersListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) 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 *RegionInstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotsTestIamPermissionsCall { +func (c *RegionMultiMigMembersListCall) Fields(s ...googleapi.Field) *RegionMultiMigMembersListCall { 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 *RegionMultiMigMembersListCall) IfNoneMatch(entityTag string) *RegionMultiMigMembersListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionInstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstantSnapshotsTestIamPermissionsCall { +func (c *RegionMultiMigMembersListCall) Context(ctx context.Context) *RegionMultiMigMembersListCall { 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 *RegionInstantSnapshotsTestIamPermissionsCall) Header() http.Header { +func (c *RegionMultiMigMembersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testpermissionsrequest) - if err != nil { - return nil, err +func (c *RegionMultiMigMembersListCall) 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, "projects/{project}/regions/{region}/instantSnapshots/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}/multiMigMembers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, nil) if err != nil { return nil, err } @@ -16026,19 +15755,19 @@ func (c *RegionInstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*h googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "resource": c.resource, + "multiMig": c.multiMig, }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.regionMultiMigMembers.list", "request", internallog.HTTPRequest(req, nil)) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstantSnapshots.testIamPermissions" call. +// Do executes the "compute.regionMultiMigMembers.list" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.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 *RegionInstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *MultiMigMemberList.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 *RegionMultiMigMembersListCall) Do(opts ...googleapi.CallOption) (*MultiMigMemberList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16057,7 +15786,7 @@ func (c *RegionInstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &MultiMigMemberList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16068,10 +15797,31 @@ func (c *RegionInstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.Call if err != nil { return nil, err } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionInstantSnapshots.testIamPermissions", "response", internallog.HTTPResponse(res, b)) + c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "compute.regionMultiMigMembers.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 *RegionMultiMigMembersListCall) Pages(ctx context.Context, f func(*MultiMigMemberList) 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 RegionMultiMigsDeleteCall struct { s *Service project string diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 9f305b72e9c..4adfd1e4256 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -29945,6 +29945,58 @@ "https://www.googleapis.com/auth/compute" ] }, + "deleteRoutePolicy": { + "description": "Deletes Route Policy", + "flatPath": "projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy", + "httpMethod": "POST", + "id": "compute.routers.deleteRoutePolicy", + "parameterOrder": [ + "project", + "region", + "router" + ], + "parameters": { + "policy": { + "description": "The Policy name for this request. Name must conform to RFC1035", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "router": { + "description": "Name of the Router resource where Route Policy is defined.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "get": { "description": "Returns the specified Router resource.", "flatPath": "projects/{project}/regions/{region}/routers/{router}", @@ -30111,6 +30163,53 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getRoutePolicy": { + "description": "Returns specified Route Policy", + "flatPath": "projects/{project}/regions/{region}/routers/{router}/getRoutePolicy", + "httpMethod": "GET", + "id": "compute.routers.getRoutePolicy", + "parameterOrder": [ + "project", + "region", + "router" + ], + "parameters": { + "policy": { + "description": "The Policy name for this request. Name must conform to RFC1035", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "router": { + "description": "Name of the Router resource to query for the route policy. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/routers/{router}/getRoutePolicy", + "response": { + "$ref": "RoutersGetRoutePolicyResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "getRouterStatus": { "description": "Retrieves runtime information of the specified router.", "flatPath": "projects/{project}/regions/{region}/routers/{router}/getRouterStatus", @@ -30259,6 +30358,196 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "listBgpRoutes": { + "description": "Retrieves a list of router bgp routes available to the specified project.", + "flatPath": "projects/{project}/regions/{region}/routers/{router}/listBgpRoutes", + "httpMethod": "GET", + "id": "compute.routers.listBgpRoutes", + "parameterOrder": [ + "project", + "region", + "router" + ], + "parameters": { + "addressFamily": { + "default": "UNSPECIFIED_IP_VERSION", + "description": "(Required) limit results to this address family (either IPv4 or IPv6)", + "enum": [ + "IPV4", + "IPV6", + "UNSPECIFIED_IP_VERSION" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "location": "query", + "type": "string" + }, + "destinationPrefix": { + "description": "Limit results to destinations that are subnets of this CIDR range", + "location": "query", + "type": "string" + }, + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "peer": { + "description": "(Required) limit results to the BGP peer with the given name. Name should conform to RFC1035.", + "location": "query", + "type": "string" + }, + "policyApplied": { + "default": "true", + "description": "When true, the method returns post-policy routes. Otherwise, it returns pre-policy routes.", + "location": "query", + "type": "boolean" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + }, + "routeType": { + "default": "UNSPECIFIED_ROUTE_TYPE", + "description": "(Required) limit results to this type of route (either LEARNED or ADVERTISED)", + "enum": [ + "ADVERTISED", + "LEARNED", + "UNSPECIFIED_ROUTE_TYPE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "location": "query", + "type": "string" + }, + "router": { + "description": "Name or id of the resource for this request. Name should conform to RFC1035.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/routers/{router}/listBgpRoutes", + "response": { + "$ref": "RoutersListBgpRoutes" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "listRoutePolicies": { + "description": "Retrieves a list of router route policy subresources available to the specified project.", + "flatPath": "projects/{project}/regions/{region}/routers/{router}/listRoutePolicies", + "httpMethod": "GET", + "id": "compute.routers.listRoutePolicies", + "parameterOrder": [ + "project", + "region", + "router" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + }, + "router": { + "description": "Name or id of the resource for this request. Name should conform to RFC1035.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/routers/{router}/listRoutePolicies", + "response": { + "$ref": "RoutersListRoutePolicies" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "patch": { "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", "flatPath": "projects/{project}/regions/{region}/routers/{router}", @@ -30309,6 +30598,56 @@ "https://www.googleapis.com/auth/compute" ] }, + "patchRoutePolicy": { + "description": "Patches Route Policy", + "flatPath": "projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy", + "httpMethod": "POST", + "id": "compute.routers.patchRoutePolicy", + "parameterOrder": [ + "project", + "region", + "router" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "router": { + "description": "Name of the Router resource where Route Policy is defined.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy", + "request": { + "$ref": "RoutePolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "preview": { "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.", "flatPath": "projects/{project}/regions/{region}/routers/{router}/preview", @@ -30404,6 +30743,56 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "updateRoutePolicy": { + "description": "Updates or creates new Route Policy", + "flatPath": "projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy", + "httpMethod": "POST", + "id": "compute.routers.updateRoutePolicy", + "parameterOrder": [ + "project", + "region", + "router" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "router": { + "description": "Name of the Router resource where Route Policy is defined.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy", + "request": { + "$ref": "RoutePolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -38203,7 +38592,7 @@ } } }, - "revision": "20250126", + "revision": "20250211", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -39526,14 +39915,18 @@ "VM_FAMILY_CLOUD_TPU_DEVICE_CT3", "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L", "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP", + "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E", "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P", - "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" + "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P", + "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" ], "enumDescriptions": [ "", "", "", "", + "", + "", "" ], "type": "string" @@ -42752,6 +43145,91 @@ }, "type": "object" }, + "BgpRoute": { + "id": "BgpRoute", + "properties": { + "asPaths": { + "description": "[Output only] AS-PATH for the route", + "items": { + "$ref": "BgpRouteAsPath" + }, + "type": "array" + }, + "communities": { + "description": "[Output only] BGP communities in human-readable A:B format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "destination": { + "$ref": "BgpRouteNetworkLayerReachabilityInformation", + "description": "[Output only] Destination IP range for the route, in human-readable CIDR format" + }, + "med": { + "description": "[Output only] BGP multi-exit discriminator", + "format": "uint32", + "type": "integer" + }, + "origin": { + "description": "[Output only] BGP origin (EGP, IGP or INCOMPLETE)", + "enum": [ + "BGP_ORIGIN_EGP", + "BGP_ORIGIN_IGP", + "BGP_ORIGIN_INCOMPLETE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "BgpRouteAsPath": { + "id": "BgpRouteAsPath", + "properties": { + "asns": { + "description": "[Output only] ASNs in the path segment. When type is SEQUENCE, these are ordered.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "type": { + "description": "[Output only] Type of AS-PATH segment (SEQUENCE or SET)", + "enum": [ + "AS_PATH_TYPE_SEQUENCE", + "AS_PATH_TYPE_SET" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "BgpRouteNetworkLayerReachabilityInformation": { + "description": "Network Layer Reachability Information (NLRI) for a route.", + "id": "BgpRouteNetworkLayerReachabilityInformation", + "properties": { + "pathId": { + "description": "If the BGP session supports multiple paths (RFC 7911), the path identifier for this route.", + "format": "uint32", + "type": "integer" + }, + "prefix": { + "description": "Human readable CIDR notation for a prefix. E.g. 10.42.0.0/16.", + "type": "string" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members`, or principals, with a `role`.", "id": "Binding", @@ -69678,6 +70156,11 @@ }, "type": "array" }, + "priority": { + "description": "[Output only] Priority of firewall policy association. Not applicable for type=HIERARCHY.", + "format": "int32", + "type": "integer" + }, "rules": { "description": "[Output only] The rules that apply to the network.", "items": { @@ -69691,9 +70174,13 @@ "HIERARCHY", "NETWORK", "NETWORK_REGIONAL", + "SYSTEM_GLOBAL", + "SYSTEM_REGIONAL", "UNSPECIFIED" ], "enumDescriptions": [ + "", + "", "", "", "", @@ -71750,6 +72237,65 @@ }, "type": "object" }, + "RoutePolicy": { + "id": "RoutePolicy", + "properties": { + "description": { + "description": "An optional description of route policy.", + "type": "string" + }, + "fingerprint": { + "description": "A fingerprint for the Route Policy being applied to this Router, which is essentially a hash of the Route Policy used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update Route Policy. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make a getRoutePolicy() request to retrieve a Route Policy.", + "format": "byte", + "type": "string" + }, + "name": { + "description": "Route Policy name, which must be a resource ID segment and unique within all the router's Route Policies. Name should conform to RFC1035.", + "type": "string" + }, + "terms": { + "description": "List of terms (the order in the list is not important, they are evaluated in order of priority). Order of policies is not retained and might change when getting policy later.", + "items": { + "$ref": "RoutePolicyPolicyTerm" + }, + "type": "array" + }, + "type": { + "enum": [ + "ROUTE_POLICY_TYPE_EXPORT", + "ROUTE_POLICY_TYPE_IMPORT" + ], + "enumDescriptions": [ + "The Route Policy is an Export Policy.", + "The Route Policy is an Import Policy." + ], + "type": "string" + } + }, + "type": "object" + }, + "RoutePolicyPolicyTerm": { + "id": "RoutePolicyPolicyTerm", + "properties": { + "actions": { + "description": "CEL expressions to evaluate to modify a route when this term matches.", + "items": { + "$ref": "Expr" + }, + "type": "array" + }, + "match": { + "$ref": "Expr", + "description": "CEL expression evaluated against a route to determine if this term applies. When not set, the term applies to all routes." + }, + "priority": { + "description": "The evaluation priority for this term, which must be between 0 (inclusive) and 2^31 (exclusive), and unique within the list.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Router": { "description": "Represents a Cloud Router resource. For more information about Cloud Router, read the Cloud Router overview.", "id": "Router", @@ -72146,14 +72692,14 @@ "type": "boolean" }, "exportPolicies": { - "description": "List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.", + "description": "List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type.", "items": { "type": "string" }, "type": "array" }, "importPolicies": { - "description": "List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies.", + "description": "List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type.", "items": { "type": "string" }, @@ -73054,6 +73600,343 @@ }, "type": "object" }, + "RoutersGetRoutePolicyResponse": { + "id": "RoutersGetRoutePolicyResponse", + "properties": { + "resource": { + "$ref": "RoutePolicy" + } + }, + "type": "object" + }, + "RoutersListBgpRoutes": { + "id": "RoutersListBgpRoutes", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "type": "string" + }, + "kind": { + "default": "compute#routersListBgpRoutes", + "description": "[Output Only] Type of resource. Always compute#routersListBgpRoutes for lists of bgp routes.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "result": { + "description": "[Output Only] A list of bgp routes.", + "items": { + "$ref": "BgpRoute" + }, + "type": "array" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "RoutersListRoutePolicies": { + "id": "RoutersListRoutePolicies", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "type": "string" + }, + "kind": { + "default": "compute#routersListRoutePolicies", + "description": "[Output Only] Type of resource. Always compute#routersListRoutePolicies for lists of route policies.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "result": { + "description": "[Output Only] A list of route policies.", + "items": { + "$ref": "RoutePolicy" + }, + "type": "array" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "RoutersPreviewResponse": { "id": "RoutersPreviewResponse", "properties": { @@ -74184,9 +75067,11 @@ "ddosProtection": { "enum": [ "ADVANCED", + "ADVANCED_PREVIEW", "STANDARD" ], "enumDescriptions": [ + "", "", "" ], @@ -75938,7 +76823,7 @@ "description": "Customer provided encryption key when creating Snapshot from Instant Snapshot." }, "sourceInstantSnapshotId": { - "description": "[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this persistent disk. For example, if you created the persistent disk from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.", + "description": "[Output Only] The unique ID of the instant snapshot used to create this snapshot. This value identifies the exact instant snapshot that was used to create this snapshot. For example, if you created the snapshot from an instant snapshot that was later deleted and recreated under the same name, the source instant snapshot ID would identify the exact instant snapshot that was used.", "type": "string" }, "sourceSnapshotSchedulePolicy": { @@ -79241,7 +80126,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION, PRIVATE_SERVICE_CONNECT or PRIVATE_NAT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. A subnet with purpose set to PRIVATE_NAT is used for Private NAT IP address by Private NAT Gateway. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", @@ -84515,7 +85400,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION, PRIVATE_SERVICE_CONNECT or PRIVATE_NAT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. A subnet with purpose set to PRIVATE_NAT is used for Private NAT IP address by Private NAT Gateway. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index b81a00da31f..b9194d76cab 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -2772,8 +2772,10 @@ type AllocationAggregateReservation struct { // "VM_FAMILY_CLOUD_TPU_DEVICE_CT3" // "VM_FAMILY_CLOUD_TPU_LITE_DEVICE_CT5L" // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT5LP" + // "VM_FAMILY_CLOUD_TPU_LITE_POD_SLICE_CT6E" // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT3P" // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT4P" + // "VM_FAMILY_CLOUD_TPU_POD_SLICE_CT5P" VmFamily string `json:"vmFamily,omitempty"` // WorkloadType: The workload type of the instances that will target this // reservation. @@ -6777,6 +6779,95 @@ func (s BfdStatusPacketCounts) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BgpRoute struct { + // AsPaths: [Output only] AS-PATH for the route + AsPaths []*BgpRouteAsPath `json:"asPaths,omitempty"` + // Communities: [Output only] BGP communities in human-readable A:B format. + Communities []string `json:"communities,omitempty"` + // Destination: [Output only] Destination IP range for the route, in + // human-readable CIDR format + Destination *BgpRouteNetworkLayerReachabilityInformation `json:"destination,omitempty"` + // Med: [Output only] BGP multi-exit discriminator + Med int64 `json:"med,omitempty"` + // Origin: [Output only] BGP origin (EGP, IGP or INCOMPLETE) + // + // Possible values: + // "BGP_ORIGIN_EGP" + // "BGP_ORIGIN_IGP" + // "BGP_ORIGIN_INCOMPLETE" + Origin string `json:"origin,omitempty"` + // ForceSendFields is a list of field names (e.g. "AsPaths") 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. "AsPaths") 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 BgpRoute) MarshalJSON() ([]byte, error) { + type NoMethod BgpRoute + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type BgpRouteAsPath struct { + // Asns: [Output only] ASNs in the path segment. When type is SEQUENCE, these + // are ordered. + Asns []int64 `json:"asns,omitempty"` + // Type: [Output only] Type of AS-PATH segment (SEQUENCE or SET) + // + // Possible values: + // "AS_PATH_TYPE_SEQUENCE" + // "AS_PATH_TYPE_SET" + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Asns") 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. "Asns") 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 BgpRouteAsPath) MarshalJSON() ([]byte, error) { + type NoMethod BgpRouteAsPath + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BgpRouteNetworkLayerReachabilityInformation: Network Layer Reachability +// Information (NLRI) for a route. +type BgpRouteNetworkLayerReachabilityInformation struct { + // PathId: If the BGP session supports multiple paths (RFC 7911), the path + // identifier for this route. + PathId int64 `json:"pathId,omitempty"` + // Prefix: Human readable CIDR notation for a prefix. E.g. 10.42.0.0/16. + Prefix string `json:"prefix,omitempty"` + // ForceSendFields is a list of field names (e.g. "PathId") 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. "PathId") 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 BgpRouteNetworkLayerReachabilityInformation) MarshalJSON() ([]byte, error) { + type NoMethod BgpRouteNetworkLayerReachabilityInformation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members`, or principals, with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. If the @@ -36736,6 +36827,9 @@ type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewall // PacketMirroringRules: [Output only] The packet mirroring rules that apply to // the network. PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` + // Priority: [Output only] Priority of firewall policy association. Not + // applicable for type=HIERARCHY. + Priority int64 `json:"priority,omitempty"` // Rules: [Output only] The rules that apply to the network. Rules []*FirewallPolicyRule `json:"rules,omitempty"` // Type: [Output Only] The type of the firewall policy. Can be one of @@ -36745,6 +36839,8 @@ type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewall // "HIERARCHY" // "NETWORK" // "NETWORK_REGIONAL" + // "SYSTEM_GLOBAL" + // "SYSTEM_REGIONAL" // "UNSPECIFIED" Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to @@ -38987,6 +39083,74 @@ func (s RouteListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type RoutePolicy struct { + // Description: An optional description of route policy. + Description string `json:"description,omitempty"` + // Fingerprint: A fingerprint for the Route Policy being applied to this + // Router, which is essentially a hash of the Route Policy used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update Route Policy. You must + // always provide an up-to-date fingerprint hash in order to update or change + // labels. To see the latest fingerprint, make a getRoutePolicy() request to + // retrieve a Route Policy. + Fingerprint string `json:"fingerprint,omitempty"` + // Name: Route Policy name, which must be a resource ID segment and unique + // within all the router's Route Policies. Name should conform to RFC1035. + Name string `json:"name,omitempty"` + // Terms: List of terms (the order in the list is not important, they are + // evaluated in order of priority). Order of policies is not retained and might + // change when getting policy later. + Terms []*RoutePolicyPolicyTerm `json:"terms,omitempty"` + // Possible values: + // "ROUTE_POLICY_TYPE_EXPORT" - The Route Policy is an Export Policy. + // "ROUTE_POLICY_TYPE_IMPORT" - The Route Policy is an Import Policy. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") 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 RoutePolicy) MarshalJSON() ([]byte, error) { + type NoMethod RoutePolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RoutePolicyPolicyTerm struct { + // Actions: CEL expressions to evaluate to modify a route when this term + // matches. + Actions []*Expr `json:"actions,omitempty"` + // Match: CEL expression evaluated against a route to determine if this term + // applies. When not set, the term applies to all routes. + Match *Expr `json:"match,omitempty"` + // Priority: The evaluation priority for this term, which must be between 0 + // (inclusive) and 2^31 (exclusive), and unique within the list. + Priority int64 `json:"priority,omitempty"` + // ForceSendFields is a list of field names (e.g. "Actions") 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. "Actions") 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 RoutePolicyPolicyTerm) MarshalJSON() ([]byte, error) { + type NoMethod RoutePolicyPolicyTerm + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Router: Represents a Cloud Router resource. For more information about Cloud // Router, read the Cloud Router overview. type Router struct { @@ -39358,13 +39522,11 @@ type RouterBgpPeer struct { EnableIpv6 bool `json:"enableIpv6,omitempty"` // ExportPolicies: List of export policies applied to this peer, in the order // they must be evaluated. The name must correspond to an existing policy that - // has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently - // available in preview. Please use Beta API to use Route Policies. + // has ROUTE_POLICY_TYPE_EXPORT type. ExportPolicies []string `json:"exportPolicies,omitempty"` // ImportPolicies: List of import policies applied to this peer, in the order // they must be evaluated. The name must correspond to an existing policy that - // has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently - // available in preview. Please use Beta API to use Route Policies. + // has ROUTE_POLICY_TYPE_IMPORT type. ImportPolicies []string `json:"importPolicies,omitempty"` // InterfaceName: Name of the interface the BGP peer is associated with. InterfaceName string `json:"interfaceName,omitempty"` @@ -40298,6 +40460,348 @@ func (s RouterStatusResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type RoutersGetRoutePolicyResponse struct { + Resource *RoutePolicy `json:"resource,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Resource") 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. "Resource") 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 RoutersGetRoutePolicyResponse) MarshalJSON() ([]byte, error) { + type NoMethod RoutersGetRoutePolicyResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RoutersListBgpRoutes struct { + Etag string `json:"etag,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This identifier is + // defined by the server. + Id string `json:"id,omitempty"` + // Kind: [Output Only] Type of resource. Always compute#routersListBgpRoutes + // for lists of bgp routes. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will have their + // own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // Result: [Output Only] A list of bgp routes. + Result []*BgpRoute `json:"result,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RoutersListBgpRoutesWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 RoutersListBgpRoutes) MarshalJSON() ([]byte, error) { + type NoMethod RoutersListBgpRoutes + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RoutersListBgpRoutesWarning: [Output Only] Informational warning message. +type RoutersListBgpRoutesWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*RoutersListBgpRoutesWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 RoutersListBgpRoutesWarning) MarshalJSON() ([]byte, error) { + type NoMethod RoutersListBgpRoutesWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RoutersListBgpRoutesWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 RoutersListBgpRoutesWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RoutersListBgpRoutesWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RoutersListRoutePolicies struct { + Etag string `json:"etag,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This identifier is + // defined by the server. + Id string `json:"id,omitempty"` + // Kind: [Output Only] Type of resource. Always + // compute#routersListRoutePolicies for lists of route policies. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will have their + // own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // Result: [Output Only] A list of route policies. + Result []*RoutePolicy `json:"result,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *RoutersListRoutePoliciesWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Etag") 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. "Etag") 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 RoutersListRoutePolicies) MarshalJSON() ([]byte, error) { + type NoMethod RoutersListRoutePolicies + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RoutersListRoutePoliciesWarning: [Output Only] Informational warning +// message. +type RoutersListRoutePoliciesWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*RoutersListRoutePoliciesWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") 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. "Code") 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 RoutersListRoutePoliciesWarning) MarshalJSON() ([]byte, error) { + type NoMethod RoutersListRoutePoliciesWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RoutersListRoutePoliciesWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") 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. "Key") 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 RoutersListRoutePoliciesWarningData) MarshalJSON() ([]byte, error) { + type NoMethod RoutersListRoutePoliciesWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type RoutersPreviewResponse struct { // Resource: Preview of given router. Resource *Router `json:"resource,omitempty"` @@ -41550,6 +42054,7 @@ func (s SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) MarshalJSON() ([]by type SecurityPolicyDdosProtectionConfig struct { // Possible values: // "ADVANCED" + // "ADVANCED_PREVIEW" // "STANDARD" DdosProtection string `json:"ddosProtection,omitempty"` // ForceSendFields is a list of field names (e.g. "DdosProtection") to @@ -43623,10 +44128,10 @@ type Snapshot struct { SourceInstantSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceInstantSnapshotEncryptionKey,omitempty"` // SourceInstantSnapshotId: [Output Only] The unique ID of the instant snapshot // used to create this snapshot. This value identifies the exact instant - // snapshot that was used to create this persistent disk. For example, if you - // created the persistent disk from an instant snapshot that was later deleted - // and recreated under the same name, the source instant snapshot ID would - // identify the exact instant snapshot that was used. + // snapshot that was used to create this snapshot. For example, if you created + // the snapshot from an instant snapshot that was later deleted and recreated + // under the same name, the source instant snapshot ID would identify the exact + // instant snapshot that was used. SourceInstantSnapshotId string `json:"sourceInstantSnapshotId,omitempty"` // SourceSnapshotSchedulePolicy: [Output Only] URL of the resource policy which // created this scheduled snapshot. @@ -46973,15 +47478,17 @@ type Subnetwork struct { // VMs in this subnet to Google services. PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or - // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created - // subnets or subnets that are automatically created in auto mode networks. - // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY - // are user-created subnetworks that are reserved for Envoy-based load - // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to - // publish services using Private Service Connect. A subnet with purpose set to - // PEER_MIGRATION is used for subnet migration from one peered VPC to another. - // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION, + // PRIVATE_SERVICE_CONNECT or PRIVATE_NAT. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in auto mode + // networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or + // REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for + // Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private Service + // Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet + // migration from one peered VPC to another. A subnet with purpose set to + // PRIVATE_NAT is used for Private NAT IP address by Private NAT Gateway. If + // unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // @@ -52871,15 +53378,17 @@ type UsableSubnetwork struct { // Network: Network URL. Network string `json:"network,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or - // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created - // subnets or subnets that are automatically created in auto mode networks. - // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY - // are user-created subnetworks that are reserved for Envoy-based load - // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to - // publish services using Private Service Connect. A subnet with purpose set to - // PEER_MIGRATION is used for subnet migration from one peered VPC to another. - // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION, + // PRIVATE_SERVICE_CONNECT or PRIVATE_NAT. PRIVATE is the default purpose for + // user-created subnets or subnets that are automatically created in auto mode + // networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or + // REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for + // Envoy-based load balancers. A subnet with purpose set to + // PRIVATE_SERVICE_CONNECT is used to publish services using Private Service + // Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet + // migration from one peered VPC to another. A subnet with purpose set to + // PRIVATE_NAT is used for Private NAT IP address by Private NAT Gateway. If + // unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // diff --git a/compute/v1/compute3-gen.go b/compute/v1/compute3-gen.go index b5ad92a0bec..479042b83ce 100644 --- a/compute/v1/compute3-gen.go +++ b/compute/v1/compute3-gen.go @@ -27084,6 +27084,133 @@ func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) return ret, nil } +type RoutersDeleteRoutePolicyCall struct { + s *Service + project string + region string + router string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DeleteRoutePolicy: Deletes Route Policy +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - router: Name of the Router resource where Route Policy is defined. +func (r *RoutersService) DeleteRoutePolicy(project string, region string, router string) *RoutersDeleteRoutePolicyCall { + c := &RoutersDeleteRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.router = router + return c +} + +// Policy sets the optional parameter "policy": The Policy name for this +// request. Name must conform to RFC1035 +func (c *RoutersDeleteRoutePolicyCall) Policy(policy string) *RoutersDeleteRoutePolicyCall { + c.urlParams_.Set("policy", policy) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RoutersDeleteRoutePolicyCall) RequestId(requestId string) *RoutersDeleteRoutePolicyCall { + c.urlParams_.Set("requestId", requestId) + 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 *RoutersDeleteRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersDeleteRoutePolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RoutersDeleteRoutePolicyCall) Context(ctx context.Context) *RoutersDeleteRoutePolicyCall { + 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 *RoutersDeleteRoutePolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutersDeleteRoutePolicyCall) 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, "projects/{project}/regions/{region}/routers/{router}/deleteRoutePolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, nil) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "router": c.router, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.deleteRoutePolicy", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.routers.deleteRoutePolicy" 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 *RoutersDeleteRoutePolicyCall) 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", "compute.routers.deleteRoutePolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type RoutersGetCall struct { s *Service project string @@ -27555,6 +27682,132 @@ func (c *RoutersGetNatMappingInfoCall) Pages(ctx context.Context, f func(*VmEndp } } +type RoutersGetRoutePolicyCall struct { + s *Service + project string + region string + router string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetRoutePolicy: Returns specified Route Policy +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - router: Name of the Router resource to query for the route policy. The +// name should conform to RFC1035. +func (r *RoutersService) GetRoutePolicy(project string, region string, router string) *RoutersGetRoutePolicyCall { + c := &RoutersGetRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.router = router + return c +} + +// Policy sets the optional parameter "policy": The Policy name for this +// request. Name must conform to RFC1035 +func (c *RoutersGetRoutePolicyCall) Policy(policy string) *RoutersGetRoutePolicyCall { + c.urlParams_.Set("policy", policy) + 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 *RoutersGetRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersGetRoutePolicyCall { + 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 *RoutersGetRoutePolicyCall) IfNoneMatch(entityTag string) *RoutersGetRoutePolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RoutersGetRoutePolicyCall) Context(ctx context.Context) *RoutersGetRoutePolicyCall { + 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 *RoutersGetRoutePolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutersGetRoutePolicyCall) 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, "projects/{project}/regions/{region}/routers/{router}/getRoutePolicy") + 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{ + "project": c.project, + "region": c.region, + "router": c.router, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.getRoutePolicy", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.routers.getRoutePolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *RoutersGetRoutePolicyResponse.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 *RoutersGetRoutePolicyCall) Do(opts ...googleapi.CallOption) (*RoutersGetRoutePolicyResponse, 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 := &RoutersGetRoutePolicyResponse{ + 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", "compute.routers.getRoutePolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type RoutersGetRouterStatusCall struct { s *Service project string @@ -28009,45 +28262,530 @@ func (c *RoutersListCall) Pages(ctx context.Context, f func(*RouterList) error) } } -type RoutersPatchCall struct { - s *Service - project string - region string - router string - router2 *Router - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RoutersListBgpRoutesCall struct { + s *Service + project string + region string + router string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Patches the specified Router resource with the data included in the -// request. This method supports PATCH semantics and uses JSON merge patch -// format and processing rules. +// ListBgpRoutes: Retrieves a list of router bgp routes available to the +// specified project. // -// - project: Project ID for this request. -// - region: Name of the region for this request. -// - router: Name of the Router resource to patch. -func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { - c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - router: Name or id of the resource for this request. Name should conform +// to RFC1035. +func (r *RoutersService) ListBgpRoutes(project string, region string, router string) *RoutersListBgpRoutesCall { + c := &RoutersListBgpRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.router = router - c.router2 = router2 return c } -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. For example, consider a situation where you make an initial -// request and the request times out. If you make the request again with the -// same request ID, the server can check if original operation with the same -// request ID was received, and if so, will ignore the second request. This -// prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RoutersPatchCall) RequestId(requestId string) *RoutersPatchCall { - c.urlParams_.Set("requestId", requestId) +// AddressFamily sets the optional parameter "addressFamily": (Required) limit +// results to this address family (either IPv4 or IPv6) +// +// Possible values: +// +// "IPV4" +// "IPV6" +// "UNSPECIFIED_IP_VERSION" (default) +func (c *RoutersListBgpRoutesCall) AddressFamily(addressFamily string) *RoutersListBgpRoutesCall { + c.urlParams_.Set("addressFamily", addressFamily) + return c +} + +// DestinationPrefix sets the optional parameter "destinationPrefix": Limit +// results to destinations that are subnets of this CIDR range +func (c *RoutersListBgpRoutesCall) DestinationPrefix(destinationPrefix string) *RoutersListBgpRoutesCall { + c.urlParams_.Set("destinationPrefix", destinationPrefix) + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RoutersListBgpRoutesCall) Filter(filter string) *RoutersListBgpRoutesCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RoutersListBgpRoutesCall) MaxResults(maxResults int64) *RoutersListBgpRoutesCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RoutersListBgpRoutesCall) OrderBy(orderBy string) *RoutersListBgpRoutesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RoutersListBgpRoutesCall) PageToken(pageToken string) *RoutersListBgpRoutesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Peer sets the optional parameter "peer": (Required) limit results to the BGP +// peer with the given name. Name should conform to RFC1035. +func (c *RoutersListBgpRoutesCall) Peer(peer string) *RoutersListBgpRoutesCall { + c.urlParams_.Set("peer", peer) + return c +} + +// PolicyApplied sets the optional parameter "policyApplied": When true, the +// method returns post-policy routes. Otherwise, it returns pre-policy routes. +func (c *RoutersListBgpRoutesCall) PolicyApplied(policyApplied bool) *RoutersListBgpRoutesCall { + c.urlParams_.Set("policyApplied", fmt.Sprint(policyApplied)) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RoutersListBgpRoutesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersListBgpRoutesCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// RouteType sets the optional parameter "routeType": (Required) limit results +// to this type of route (either LEARNED or ADVERTISED) +// +// Possible values: +// +// "ADVERTISED" +// "LEARNED" +// "UNSPECIFIED_ROUTE_TYPE" (default) +func (c *RoutersListBgpRoutesCall) RouteType(routeType string) *RoutersListBgpRoutesCall { + c.urlParams_.Set("routeType", routeType) + 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 *RoutersListBgpRoutesCall) Fields(s ...googleapi.Field) *RoutersListBgpRoutesCall { + 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 *RoutersListBgpRoutesCall) IfNoneMatch(entityTag string) *RoutersListBgpRoutesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RoutersListBgpRoutesCall) Context(ctx context.Context) *RoutersListBgpRoutesCall { + 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 *RoutersListBgpRoutesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutersListBgpRoutesCall) 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, "projects/{project}/regions/{region}/routers/{router}/listBgpRoutes") + 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{ + "project": c.project, + "region": c.region, + "router": c.router, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.listBgpRoutes", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.routers.listBgpRoutes" call. +// Any non-2xx status code is an error. Response headers are in either +// *RoutersListBgpRoutes.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 *RoutersListBgpRoutesCall) Do(opts ...googleapi.CallOption) (*RoutersListBgpRoutes, 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 := &RoutersListBgpRoutes{ + 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", "compute.routers.listBgpRoutes", "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 *RoutersListBgpRoutesCall) Pages(ctx context.Context, f func(*RoutersListBgpRoutes) 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 RoutersListRoutePoliciesCall struct { + s *Service + project string + region string + router string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListRoutePolicies: Retrieves a list of router route policy subresources +// available to the specified project. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - router: Name or id of the resource for this request. Name should conform +// to RFC1035. +func (r *RoutersService) ListRoutePolicies(project string, region string, router string) *RoutersListRoutePoliciesCall { + c := &RoutersListRoutePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.router = router + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RoutersListRoutePoliciesCall) Filter(filter string) *RoutersListRoutePoliciesCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RoutersListRoutePoliciesCall) MaxResults(maxResults int64) *RoutersListRoutePoliciesCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RoutersListRoutePoliciesCall) OrderBy(orderBy string) *RoutersListRoutePoliciesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RoutersListRoutePoliciesCall) PageToken(pageToken string) *RoutersListRoutePoliciesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RoutersListRoutePoliciesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RoutersListRoutePoliciesCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + 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 *RoutersListRoutePoliciesCall) Fields(s ...googleapi.Field) *RoutersListRoutePoliciesCall { + 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 *RoutersListRoutePoliciesCall) IfNoneMatch(entityTag string) *RoutersListRoutePoliciesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RoutersListRoutePoliciesCall) Context(ctx context.Context) *RoutersListRoutePoliciesCall { + 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 *RoutersListRoutePoliciesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutersListRoutePoliciesCall) 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, "projects/{project}/regions/{region}/routers/{router}/listRoutePolicies") + 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{ + "project": c.project, + "region": c.region, + "router": c.router, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.listRoutePolicies", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.routers.listRoutePolicies" call. +// Any non-2xx status code is an error. Response headers are in either +// *RoutersListRoutePolicies.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 *RoutersListRoutePoliciesCall) Do(opts ...googleapi.CallOption) (*RoutersListRoutePolicies, 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 := &RoutersListRoutePolicies{ + 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", "compute.routers.listRoutePolicies", "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 *RoutersListRoutePoliciesCall) Pages(ctx context.Context, f func(*RoutersListRoutePolicies) 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 RoutersPatchCall struct { + s *Service + project string + region string + router string + router2 *Router + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified Router resource with the data included in the +// request. This method supports PATCH semantics and uses JSON merge patch +// format and processing rules. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - router: Name of the Router resource to patch. +func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { + c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.router = router + c.router2 = router2 + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RoutersPatchCall) RequestId(requestId string) *RoutersPatchCall { + c.urlParams_.Set("requestId", requestId) return c } @@ -28137,6 +28875,132 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) return ret, nil } +type RoutersPatchRoutePolicyCall struct { + s *Service + project string + region string + router string + routepolicy *RoutePolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// PatchRoutePolicy: Patches Route Policy +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - router: Name of the Router resource where Route Policy is defined. +func (r *RoutersService) PatchRoutePolicy(project string, region string, router string, routepolicy *RoutePolicy) *RoutersPatchRoutePolicyCall { + c := &RoutersPatchRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.router = router + c.routepolicy = routepolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RoutersPatchRoutePolicyCall) RequestId(requestId string) *RoutersPatchRoutePolicyCall { + c.urlParams_.Set("requestId", requestId) + 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 *RoutersPatchRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersPatchRoutePolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RoutersPatchRoutePolicyCall) Context(ctx context.Context) *RoutersPatchRoutePolicyCall { + 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 *RoutersPatchRoutePolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutersPatchRoutePolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.routepolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/patchRoutePolicy") + 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{ + "project": c.project, + "region": c.region, + "router": c.router, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.patchRoutePolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.routers.patchRoutePolicy" 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 *RoutersPatchRoutePolicyCall) 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", "compute.routers.patchRoutePolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type RoutersPreviewCall struct { s *Service project string @@ -28379,6 +29243,132 @@ func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) return ret, nil } +type RoutersUpdateRoutePolicyCall struct { + s *Service + project string + region string + router string + routepolicy *RoutePolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateRoutePolicy: Updates or creates new Route Policy +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +// - router: Name of the Router resource where Route Policy is defined. +func (r *RoutersService) UpdateRoutePolicy(project string, region string, router string, routepolicy *RoutePolicy) *RoutersUpdateRoutePolicyCall { + c := &RoutersUpdateRoutePolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.router = router + c.routepolicy = routepolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. For example, consider a situation where you make an initial +// request and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RoutersUpdateRoutePolicyCall) RequestId(requestId string) *RoutersUpdateRoutePolicyCall { + c.urlParams_.Set("requestId", requestId) + 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 *RoutersUpdateRoutePolicyCall) Fields(s ...googleapi.Field) *RoutersUpdateRoutePolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RoutersUpdateRoutePolicyCall) Context(ctx context.Context) *RoutersUpdateRoutePolicyCall { + 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 *RoutersUpdateRoutePolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutersUpdateRoutePolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.routepolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/routers/{router}/updateRoutePolicy") + 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{ + "project": c.project, + "region": c.region, + "router": c.router, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "compute.routers.updateRoutePolicy", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.routers.updateRoutePolicy" 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 *RoutersUpdateRoutePolicyCall) 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", "compute.routers.updateRoutePolicy", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type RoutesDeleteCall struct { s *Service project string diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 2faeb8b9978..e429cca387d 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2685,7 +2685,7 @@ } } }, - "revision": "20250128", + "revision": "20250204", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3023,6 +3023,17 @@ }, "type": "object" }, + "AutopilotConfig": { + "description": "AutopilotConfig contains configuration of autopilot feature for this nodepool.", + "id": "AutopilotConfig", + "properties": { + "enabled": { + "description": "Denotes that nodes belonging to this node pool are Autopilot nodes.", + "type": "boolean" + } + }, + "type": "object" + }, "AutopilotConversionStatus": { "description": "AutopilotConversionStatus represents conversion status.", "id": "AutopilotConversionStatus", @@ -6575,6 +6586,10 @@ "description": "NodePool contains the name and configuration for a cluster's node pool. Node pools are a set of nodes (i.e. VM's), with a common configuration and specification, under the control of the cluster master. They may have a set of Kubernetes labels applied to them, which may be used to reference them during pod scheduling. They may also be resized up or down, to accommodate the workload.", "id": "NodePool", "properties": { + "autopilotConfig": { + "$ref": "AutopilotConfig", + "description": "Specifies the autopilot configuration for this node pool. This field is exclusively reserved for Cluster Autoscaler to implement go/gke-managed-nodes-ccc-api" + }, "autoscaling": { "$ref": "NodePoolAutoscaling", "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present." @@ -8525,7 +8540,7 @@ "Google Compute Engine quota was exceeded.", "Cluster state was manually changed by an SRE due to a system logic error.", "Unable to perform an encrypt operation against the CloudKMS key used for etcd level encryption.", - "Cluster CA is expiring soon. More codes TBA" + "Cluster CA is expiring soon." ], "type": "string" }, @@ -8945,11 +8960,13 @@ "description": "The type of the event.", "enum": [ "EVENT_TYPE_UNSPECIFIED", - "END_OF_SUPPORT" + "END_OF_SUPPORT", + "COS_MILESTONE_VERSION_UPDATE" ], "enumDescriptions": [ "EVENT_TYPE_UNSPECIFIED indicates the event type is unspecified.", - "END_OF_SUPPORT indicates GKE version reaches end of support, check standard_support_end_time and extended_support_end_time for more details." + "END_OF_SUPPORT indicates GKE version reaches end of support, check standard_support_end_time and extended_support_end_time for more details.", + "COS_MILESTONE_VERSION_UPDATE indicates that the COS node image will update COS milestone version for new patch versions starting with the one in the description." ], "type": "string" }, diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index a318e61f230..35d6ce144b2 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -710,6 +710,29 @@ func (s AutopilotCompatibilityIssue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AutopilotConfig: AutopilotConfig contains configuration of autopilot feature +// for this nodepool. +type AutopilotConfig struct { + // Enabled: Denotes that nodes belonging to this node pool are Autopilot nodes. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") 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. "Enabled") 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 AutopilotConfig) MarshalJSON() ([]byte, error) { + type NoMethod AutopilotConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // AutopilotConversionStatus: AutopilotConversionStatus represents conversion // status. type AutopilotConversionStatus struct { @@ -5112,6 +5135,10 @@ func (s *NodeNetworkConfig) UnmarshalJSON(data []byte) error { // them during pod scheduling. They may also be resized up or down, to // accommodate the workload. type NodePool struct { + // AutopilotConfig: Specifies the autopilot configuration for this node pool. + // This field is exclusively reserved for Cluster Autoscaler to implement + // go/gke-managed-nodes-ccc-api + AutopilotConfig *AutopilotConfig `json:"autopilotConfig,omitempty"` // Autoscaling: Autoscaler configuration for this NodePool. Autoscaler is // enabled only if a valid configuration is present. Autoscaling *NodePoolAutoscaling `json:"autoscaling,omitempty"` @@ -5199,15 +5226,15 @@ type NodePool struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Autoscaling") to + // ForceSendFields is a list of field names (e.g. "AutopilotConfig") 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. "Autoscaling") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "AutopilotConfig") 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:"-"` } @@ -7670,7 +7697,7 @@ type StatusCondition struct { // system logic error. // "CLOUD_KMS_KEY_ERROR" - Unable to perform an encrypt operation against the // CloudKMS key used for etcd level encryption. - // "CA_EXPIRING" - Cluster CA is expiring soon. More codes TBA + // "CA_EXPIRING" - Cluster CA is expiring soon. Code string `json:"code,omitempty"` // Message: Human-friendly representation of the condition Message string `json:"message,omitempty"` @@ -8118,6 +8145,9 @@ type UpgradeInfoEvent struct { // "END_OF_SUPPORT" - END_OF_SUPPORT indicates GKE version reaches end of // support, check standard_support_end_time and extended_support_end_time for // more details. + // "COS_MILESTONE_VERSION_UPDATE" - COS_MILESTONE_VERSION_UPDATE indicates + // that the COS node image will update COS milestone version for new patch + // versions starting with the one in the description. EventType string `json:"eventType,omitempty"` // ExtendedSupportEndTime: The end of extended support timestamp. ExtendedSupportEndTime string `json:"extendedSupportEndTime,omitempty"` diff --git a/css/v1/css-api.json b/css/v1/css-api.json index 543e439b36f..78d953472a2 100644 --- a/css/v1/css-api.json +++ b/css/v1/css-api.json @@ -507,7 +507,7 @@ } } }, - "revision": "20250106", + "revision": "20250215", "rootUrl": "https://css.googleapis.com/", "schemas": { "Account": { @@ -576,7 +576,7 @@ "type": "string" }, "parent": { - "description": "The CSS/MC account's parent resource. CSS group for CSS domains; CSS domain for MC accounts. Returned only if the user has access to the parent account.", + "description": "The CSS/MC account's parent resource. CSS group for CSS domains; CSS domain for MC accounts. Returned only if the user has access to the parent account. Note: For MC sub-accounts, this is also the CSS domain that is the parent resource of the MCA account, since we are effectively flattening the hierarchy.\"", "type": "string" } }, diff --git a/css/v1/css-gen.go b/css/v1/css-gen.go index 15b76f35101..71712272cb1 100644 --- a/css/v1/css-gen.go +++ b/css/v1/css-gen.go @@ -232,7 +232,9 @@ type Account struct { Name string `json:"name,omitempty"` // Parent: The CSS/MC account's parent resource. CSS group for CSS domains; CSS // domain for MC accounts. Returned only if the user has access to the parent - // account. + // account. Note: For MC sub-accounts, this is also the CSS domain that is the + // parent resource of the MCA account, since we are effectively flattening the + // hierarchy." Parent string `json:"parent,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. diff --git a/datastore/v1/datastore-api.json b/datastore/v1/datastore-api.json index 3197722e87a..7681e69438d 100644 --- a/datastore/v1/datastore-api.json +++ b/datastore/v1/datastore-api.json @@ -654,7 +654,7 @@ } } }, - "revision": "20250204", + "revision": "20250212", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "Aggregation": { @@ -1582,7 +1582,7 @@ "id": "GoogleDatastoreAdminV1RedirectWritesStepDetails", "properties": { "concurrencyMode": { - "description": "Ths concurrency mode for this database.", + "description": "The concurrency mode for this database.", "enum": [ "CONCURRENCY_MODE_UNSPECIFIED", "PESSIMISTIC", diff --git a/datastore/v1/datastore-gen.go b/datastore/v1/datastore-gen.go index 221ccf061f2..2f409d5ce5a 100644 --- a/datastore/v1/datastore-gen.go +++ b/datastore/v1/datastore-gen.go @@ -1484,7 +1484,7 @@ func (s GoogleDatastoreAdminV1Progress) MarshalJSON() ([]byte, error) { // GoogleDatastoreAdminV1RedirectWritesStepDetails: Details for the // `REDIRECT_WRITES` step. type GoogleDatastoreAdminV1RedirectWritesStepDetails struct { - // ConcurrencyMode: Ths concurrency mode for this database. + // ConcurrencyMode: The concurrency mode for this database. // // Possible values: // "CONCURRENCY_MODE_UNSPECIFIED" - Unspecified. diff --git a/datastore/v1beta1/datastore-api.json b/datastore/v1beta1/datastore-api.json index ee469cde7d3..0ac35677ffd 100644 --- a/datastore/v1beta1/datastore-api.json +++ b/datastore/v1beta1/datastore-api.json @@ -168,7 +168,7 @@ } } }, - "revision": "20230806", + "revision": "20250212", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "GoogleDatastoreAdminV1CommonMetadata": { @@ -496,7 +496,7 @@ "id": "GoogleDatastoreAdminV1RedirectWritesStepDetails", "properties": { "concurrencyMode": { - "description": "Ths concurrency mode for this database.", + "description": "The concurrency mode for this database.", "enum": [ "CONCURRENCY_MODE_UNSPECIFIED", "PESSIMISTIC", diff --git a/datastore/v1beta1/datastore-gen.go b/datastore/v1beta1/datastore-gen.go index 526987b897f..cca02167d0d 100644 --- a/datastore/v1beta1/datastore-gen.go +++ b/datastore/v1beta1/datastore-gen.go @@ -572,7 +572,7 @@ func (s GoogleDatastoreAdminV1Progress) MarshalJSON() ([]byte, error) { // GoogleDatastoreAdminV1RedirectWritesStepDetails: Details for the // `REDIRECT_WRITES` step. type GoogleDatastoreAdminV1RedirectWritesStepDetails struct { - // ConcurrencyMode: Ths concurrency mode for this database. + // ConcurrencyMode: The concurrency mode for this database. // // Possible values: // "CONCURRENCY_MODE_UNSPECIFIED" - Unspecified. diff --git a/datastore/v1beta3/datastore-api.json b/datastore/v1beta3/datastore-api.json index 086fac017ba..62668dfb31b 100644 --- a/datastore/v1beta3/datastore-api.json +++ b/datastore/v1beta3/datastore-api.json @@ -336,7 +336,7 @@ } } }, - "revision": "20250204", + "revision": "20250212", "rootUrl": "https://datastore.googleapis.com/", "schemas": { "Aggregation": { @@ -1094,7 +1094,7 @@ "id": "GoogleDatastoreAdminV1RedirectWritesStepDetails", "properties": { "concurrencyMode": { - "description": "Ths concurrency mode for this database.", + "description": "The concurrency mode for this database.", "enum": [ "CONCURRENCY_MODE_UNSPECIFIED", "PESSIMISTIC", diff --git a/datastore/v1beta3/datastore-gen.go b/datastore/v1beta3/datastore-gen.go index 1e7a7503b20..9b72f042646 100644 --- a/datastore/v1beta3/datastore-gen.go +++ b/datastore/v1beta3/datastore-gen.go @@ -1234,7 +1234,7 @@ func (s GoogleDatastoreAdminV1Progress) MarshalJSON() ([]byte, error) { // GoogleDatastoreAdminV1RedirectWritesStepDetails: Details for the // `REDIRECT_WRITES` step. type GoogleDatastoreAdminV1RedirectWritesStepDetails struct { - // ConcurrencyMode: Ths concurrency mode for this database. + // ConcurrencyMode: The concurrency mode for this database. // // Possible values: // "CONCURRENCY_MODE_UNSPECIFIED" - Unspecified. diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 5a53b33184f..155c465451a 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -2317,6 +2317,94 @@ } } }, + "sitemaps": { + "methods": { + "create": { + "description": "Creates a Sitemap.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/sitemaps", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/sitemaps", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1Sitemap" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Sitemap.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/sitemaps/{sitemapsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Sitemap, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`. If the caller does not have permission to access the Sitemap, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Sitemap does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/sitemaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "fetch": { + "description": "Fetch Sitemaps in a DataStore.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/sitemaps:fetch", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.fetch", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.urisMatcher.uris": { + "description": "The Sitemap uris.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/sitemaps:fetch", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1FetchSitemapsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "targetSites": { "methods": { "batchCreate": { @@ -5582,6 +5670,94 @@ } }, "resources": { + "sitemaps": { + "methods": { + "create": { + "description": "Creates a Sitemap.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine/sitemaps", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/sitemaps", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1Sitemap" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Sitemap.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine/sitemaps/{sitemapsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Sitemap, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`. If the caller does not have permission to access the Sitemap, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Sitemap does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine/sitemaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "fetch": { + "description": "Fetch Sitemaps in a DataStore.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine/sitemaps:fetch", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.fetch", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.urisMatcher.uris": { + "description": "The Sitemap uris.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/sitemaps:fetch", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1FetchSitemapsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "targetSites": { "methods": { "batchCreate": { @@ -6594,7 +6770,7 @@ } } }, - "revision": "20250211", + "revision": "20250214", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -7147,7 +7323,7 @@ "id": "GoogleCloudDiscoveryengineV1AnswerCitation", "properties": { "endIndex": { - "description": "End of the attributed segment, exclusive.", + "description": "End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" }, @@ -7159,7 +7335,7 @@ "type": "array" }, "startIndex": { - "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" } @@ -7926,6 +8102,16 @@ }, "description": "Structured search data.", "type": "object" + }, + "title": { + "description": "Output only. The title of the document.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. The URI of the document.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -9336,6 +9522,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1CreateSitemapMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1CreateSitemapMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata", @@ -9500,7 +9703,7 @@ "type": "string" }, "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "description": "Output only. The id of the default Schema associated to this data store.", "readOnly": true, "type": "string" }, @@ -9516,6 +9719,10 @@ "$ref": "GoogleCloudDiscoveryengineV1HealthcareFhirConfig", "description": "Optional. Configuration for `HEALTHCARE_FHIR` vertical." }, + "identityMappingStore": { + "description": "Immutable. The fully qualified resource name of the associated IdentityMappingStore. This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.", + "type": "string" + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -9713,6 +9920,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1DeleteSitemapMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DeleteSitemapMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata", @@ -10269,6 +10493,31 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1FetchSitemapsResponse": { + "description": "Response message for SiteSearchEngineService.FetchSitemaps method.", + "id": "GoogleCloudDiscoveryengineV1FetchSitemapsResponse", + "properties": { + "sitemapsMetadata": { + "description": "List of Sitemaps fetched.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata": { + "description": "Contains a Sitemap and its metadata.", + "id": "GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata", + "properties": { + "sitemap": { + "$ref": "GoogleCloudDiscoveryengineV1Sitemap", + "description": "The Sitemap." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1FhirStoreSource": { "description": "Cloud FhirStore source import data from.", "id": "GoogleCloudDiscoveryengineV1FhirStoreSource", @@ -12826,7 +13075,7 @@ "type": "string" }, "searchResultPersistenceCount": { - "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is similar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", "format": "int32", "type": "integer" } @@ -13486,6 +13735,28 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1Sitemap": { + "description": "A sitemap for the SiteSearchEngine.", + "id": "GoogleCloudDiscoveryengineV1Sitemap", + "properties": { + "createTime": { + "description": "Output only. The sitemap's creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The fully qualified resource name of the sitemap. `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/*` The `sitemap_id` suffix is system-generated.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1SpannerSource": { "description": "The Spanner source for importing data", "id": "GoogleCloudDiscoveryengineV1SpannerSource", @@ -14191,7 +14462,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitation", "properties": { "endIndex": { - "description": "End of the attributed segment, exclusive.", + "description": "End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" }, @@ -14203,7 +14474,7 @@ "type": "array" }, "startIndex": { - "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" } @@ -14386,6 +14657,16 @@ }, "description": "Structured search data.", "type": "object" + }, + "title": { + "description": "Output only. The title of the document.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. The URI of the document.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -15558,7 +15839,7 @@ "type": "string" }, "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "description": "Output only. The id of the default Schema associated to this data store.", "readOnly": true, "type": "string" }, @@ -15574,6 +15855,10 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaHealthcareFhirConfig", "description": "Optional. Configuration for `HEALTHCARE_FHIR` vertical." }, + "identityMappingStore": { + "description": "Immutable. The fully qualified resource name of the associated IdentityMappingStore. This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.", + "type": "string" + }, "idpConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", "description": "Output only. Data store level identity provider config.", @@ -16474,31 +16759,6 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse": { - "description": "Response message for SiteSearchEngineService.FetchSitemaps method.", - "id": "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse", - "properties": { - "sitemapsMetadata": { - "description": "List of Sitemaps fetched.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata": { - "description": "Contains a Sitemap and its metadata.", - "id": "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata", - "properties": { - "sitemap": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSitemap", - "description": "The Sitemap." - } - }, - "type": "object" - }, "GoogleCloudDiscoveryengineV1alphaFieldConfig": { "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", @@ -18564,7 +18824,7 @@ "type": "string" }, "searchResultPersistenceCount": { - "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is similar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", "format": "int32", "type": "integer" } @@ -19508,6 +19768,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries": { + "description": "The historical crawl rate timeseries data, used for monitoring.", + "id": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "properties": { + "qpsTimeSeries": { + "$ref": "GoogleMonitoringV3TimeSeries", + "description": "The QPS of the crawl rate." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata", @@ -19642,7 +19913,7 @@ "type": "string" }, "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "description": "Output only. The id of the default Schema associated to this data store.", "readOnly": true, "type": "string" }, @@ -19658,6 +19929,10 @@ "$ref": "GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig", "description": "Optional. Configuration for `HEALTHCARE_FHIR` vertical." }, + "identityMappingStore": { + "description": "Immutable. The fully qualified resource name of the associated IdentityMappingStore. This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.", + "type": "string" + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -19778,6 +20053,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries": { + "description": "The historical dedicated crawl rate timeseries data, used for monitoring. Dedicated crawl is used by Vertex AI to crawl the user's website when dedicate crawl is set.", + "id": "GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries", + "properties": { + "autoRefreshCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Vertex AI's dedicated crawl rate time series of auto-refresh, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is set, and the crawl rate is for best effort use cases like refreshing urls periodically." + }, + "userTriggeredCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Vertex AI's dedicated crawl rate time series of user triggered crawl, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is set, and user triggered crawl rate is for deterministic use cases like crawling urls or sitemaps specified by users." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata", @@ -20304,31 +20594,6 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse": { - "description": "Response message for SiteSearchEngineService.FetchSitemaps method.", - "id": "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse", - "properties": { - "sitemapsMetadata": { - "description": "List of Sitemaps fetched.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata": { - "description": "Contains a Sitemap and its metadata.", - "id": "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata", - "properties": { - "sitemap": { - "$ref": "GoogleCloudDiscoveryengineV1betaSitemap", - "description": "The Sitemap." - } - }, - "type": "object" - }, "GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig": { "description": "Config to data store for `HEALTHCARE_FHIR` vertical.", "id": "GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig", @@ -20706,6 +20971,55 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse": { + "description": "Response message for CrawlRateManagementService.ObtainCrawlRate method. The response contains organcic or dedicated crawl rate time series data for monitoring, depending on whether dedicated crawl rate is set.", + "id": "GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse", + "properties": { + "dedicatedCrawlRateTimeSeries": { + "$ref": "GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries", + "description": "The historical dedicated crawl rate timeseries data, used for monitoring." + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Errors from service when handling the request." + }, + "organicCrawlRateTimeSeries": { + "$ref": "GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries", + "description": "The historical organic crawl rate timeseries data, used for monitoring." + }, + "state": { + "description": "Output only. The state of the response.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The state is successful.", + "The state is failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries": { + "description": "The historical organic crawl rate timeseries data, used for monitoring. Organic crawl is auto-determined by Google to crawl the user's website when dedicate crawl is not set. Crawl rate is the QPS of crawl request Google sends to the user's website.", + "id": "GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries", + "properties": { + "googleOrganicCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Google's organic crawl rate time series, which is the sum of all googlebots' crawl rate. Please refer to https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers for more details about googlebots." + }, + "vertexAiOrganicCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Vertex AI's organic crawl rate time series, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is not set. Please refer to https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot for more details about Google-CloudVertexBot." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaProject": { "description": "Metadata and configurations for a Google Cloud project in the service.", "id": "GoogleCloudDiscoveryengineV1betaProject", @@ -20926,6 +21240,49 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata": { + "description": "Metadata related to the progress of the CrawlRateManagementService.RemoveDedicatedCrawlRate operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse": { + "description": "Response message for CrawlRateManagementService.RemoveDedicatedCrawlRate method. It simply returns the state of the response, and an error message if the state is FAILED.", + "id": "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Errors from service when handling the request." + }, + "state": { + "description": "Output only. The state of the response.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The state is successful.", + "The state is failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSchema": { "description": "Defines the structure and layout of a type of document data.", "id": "GoogleCloudDiscoveryengineV1betaSchema", @@ -21668,7 +22025,7 @@ "type": "string" }, "searchResultPersistenceCount": { - "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is similar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", "format": "int32", "type": "integer" } @@ -21696,6 +22053,49 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata": { + "description": "Metadata related to the progress of the CrawlRateManagementService.SetDedicatedCrawlRate operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse": { + "description": "Response message for CrawlRateManagementService.SetDedicatedCrawlRate method. It simply returns the state of the response, and an error message if the state is FAILED.", + "id": "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Errors from service when handling the request." + }, + "state": { + "description": "Output only. The state of the response.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The state is successful.", + "The state is failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSingleRegionKey": { "description": "Metadata for single-regional CMEKs.", "id": "GoogleCloudDiscoveryengineV1betaSingleRegionKey", diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 3b2e1704b0c..8fd3c09180f 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -445,6 +445,7 @@ type ProjectsLocationsCollectionsDataStoresSessionsAnswersService struct { func NewProjectsLocationsCollectionsDataStoresSiteSearchEngineService(s *Service) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService { rs := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineService{s: s} rs.Operations = NewProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService(s) + rs.Sitemaps = NewProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsService(s) rs.TargetSites = NewProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService(s) return rs } @@ -454,6 +455,8 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineService struct { Operations *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService + Sitemaps *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsService + TargetSites *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService } @@ -466,6 +469,15 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService str s *Service } +func NewProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsService(s *Service) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsService { + rs := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsService struct { + s *Service +} + func NewProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService(s *Service) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService { rs := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService{s: s} rs.Operations = NewProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService(s) @@ -771,6 +783,7 @@ type ProjectsLocationsDataStoresSessionsAnswersService struct { func NewProjectsLocationsDataStoresSiteSearchEngineService(s *Service) *ProjectsLocationsDataStoresSiteSearchEngineService { rs := &ProjectsLocationsDataStoresSiteSearchEngineService{s: s} + rs.Sitemaps = NewProjectsLocationsDataStoresSiteSearchEngineSitemapsService(s) rs.TargetSites = NewProjectsLocationsDataStoresSiteSearchEngineTargetSitesService(s) return rs } @@ -778,9 +791,20 @@ func NewProjectsLocationsDataStoresSiteSearchEngineService(s *Service) *Projects type ProjectsLocationsDataStoresSiteSearchEngineService struct { s *Service + Sitemaps *ProjectsLocationsDataStoresSiteSearchEngineSitemapsService + TargetSites *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService } +func NewProjectsLocationsDataStoresSiteSearchEngineSitemapsService(s *Service) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsService { + rs := &ProjectsLocationsDataStoresSiteSearchEngineSitemapsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresSiteSearchEngineSitemapsService struct { + s *Service +} + func NewProjectsLocationsDataStoresSiteSearchEngineTargetSitesService(s *Service) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService { rs := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService{s: s} return rs @@ -1724,12 +1748,15 @@ func (s *GoogleCloudDiscoveryengineV1Answer) UnmarshalJSON(data []byte) error { // GoogleCloudDiscoveryengineV1AnswerCitation: Citation info for a segment. type GoogleCloudDiscoveryengineV1AnswerCitation struct { - // EndIndex: End of the attributed segment, exclusive. + // EndIndex: End of the attributed segment, exclusive. Measured in bytes (UTF-8 + // unicode). If there are multi-byte characters,such as non-ASCII characters, + // the index measurement is longer than the string length. EndIndex int64 `json:"endIndex,omitempty,string"` // Sources: Citation sources for the attributed segment. Sources []*GoogleCloudDiscoveryengineV1AnswerCitationSource `json:"sources,omitempty"` // StartIndex: Index indicates the start of the segment, measured in bytes - // (UTF-8 unicode). + // (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII + // characters, the index measurement is longer than the string length. StartIndex int64 `json:"startIndex,omitempty,string"` // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with empty or @@ -2847,6 +2874,10 @@ type GoogleCloudDiscoveryengineV1AnswerReferenceStructuredDocumentInfo struct { Document string `json:"document,omitempty"` // StructData: Structured search data. StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Output only. The title of the document. + Title string `json:"title,omitempty"` + // Uri: Output only. The URI of the document. + Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -4829,6 +4860,33 @@ func (s GoogleCloudDiscoveryengineV1CreateSchemaMetadata) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1CreateSitemapMetadata: Metadata related to the +// progress of the SiteSearchEngineService.CreateSitemap operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1CreateSitemapMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1CreateSitemapMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CreateSitemapMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata: Metadata related to // the progress of the SiteSearchEngineService.CreateTargetSite operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -5008,7 +5066,7 @@ type GoogleCloudDiscoveryengineV1DataStore struct { ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // DefaultSchemaId: Output only. The id of the default Schema associated to // this data store. DefaultSchemaId string `json:"defaultSchemaId,omitempty"` // DisplayName: Required. The data store display name. This field must be a @@ -5021,6 +5079,12 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // HealthcareFhirConfig: Optional. Configuration for `HEALTHCARE_FHIR` // vertical. HealthcareFhirConfig *GoogleCloudDiscoveryengineV1HealthcareFhirConfig `json:"healthcareFhirConfig,omitempty"` + // IdentityMappingStore: Immutable. The fully qualified resource name of the + // associated IdentityMappingStore. This field can only be set for acl_enabled + // DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapp + // ing_store}`. + IdentityMappingStore string `json:"identityMappingStore,omitempty"` // IndustryVertical: Immutable. The industry vertical that the data store // registers. // @@ -5289,6 +5353,33 @@ func (s GoogleCloudDiscoveryengineV1DeleteSchemaMetadata) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1DeleteSitemapMetadata: Metadata related to the +// progress of the SiteSearchEngineService.DeleteSitemap operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1DeleteSitemapMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1DeleteSitemapMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1DeleteSitemapMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata: Metadata related to // the progress of the SiteSearchEngineService.DeleteTargetSite operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -6055,6 +6146,55 @@ func (s GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse) Marsh return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1FetchSitemapsResponse: Response message for +// SiteSearchEngineService.FetchSitemaps method. +type GoogleCloudDiscoveryengineV1FetchSitemapsResponse struct { + // SitemapsMetadata: List of Sitemaps fetched. + SitemapsMetadata []*GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata `json:"sitemapsMetadata,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "SitemapsMetadata") 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. "SitemapsMetadata") 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 GoogleCloudDiscoveryengineV1FetchSitemapsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1FetchSitemapsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata: Contains a +// Sitemap and its metadata. +type GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata struct { + // Sitemap: The Sitemap. + Sitemap *GoogleCloudDiscoveryengineV1Sitemap `json:"sitemap,omitempty"` + // ForceSendFields is a list of field names (e.g. "Sitemap") 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. "Sitemap") 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 GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1FetchSitemapsResponseSitemapMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1FhirStoreSource: Cloud FhirStore source import // data from. type GoogleCloudDiscoveryengineV1FhirStoreSource struct { @@ -10029,7 +10169,7 @@ type GoogleCloudDiscoveryengineV1SearchRequestSessionSpec struct { QueryId string `json:"queryId,omitempty"` // SearchResultPersistenceCount: The number of top search results to persist. // The persisted search results can be used for the subsequent /answer api - // call. This field is simliar to the `summary_result_count` field in + // call. This field is similar to the `summary_result_count` field in // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 // results for documents mode, or 50 for chunks mode. SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` @@ -10931,6 +11071,34 @@ func (s GoogleCloudDiscoveryengineV1SiteVerificationInfo) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1Sitemap: A sitemap for the SiteSearchEngine. +type GoogleCloudDiscoveryengineV1Sitemap struct { + // CreateTime: Output only. The sitemap's creation time. + CreateTime string `json:"createTime,omitempty"` + // Name: Output only. The fully qualified resource name of the sitemap. + // `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/ + // *` The `sitemap_id` suffix is system-generated. + Name string `json:"name,omitempty"` + // Uri: Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`. + Uri string `json:"uri,omitempty"` + // 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 GoogleCloudDiscoveryengineV1Sitemap) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Sitemap + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1SpannerSource: The Spanner source for importing // data type GoogleCloudDiscoveryengineV1SpannerSource struct { @@ -11863,12 +12031,15 @@ func (s *GoogleCloudDiscoveryengineV1alphaAnswer) UnmarshalJSON(data []byte) err // GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a // segment. type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { - // EndIndex: End of the attributed segment, exclusive. + // EndIndex: End of the attributed segment, exclusive. Measured in bytes (UTF-8 + // unicode). If there are multi-byte characters,such as non-ASCII characters, + // the index measurement is longer than the string length. EndIndex int64 `json:"endIndex,omitempty,string"` // Sources: Citation sources for the attributed segment. Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` // StartIndex: Index indicates the start of the segment, measured in bytes - // (UTF-8 unicode). + // (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII + // characters, the index measurement is longer than the string length. StartIndex int64 `json:"startIndex,omitempty,string"` // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with empty or @@ -12129,6 +12300,10 @@ type GoogleCloudDiscoveryengineV1alphaAnswerReferenceStructuredDocumentInfo stru Document string `json:"document,omitempty"` // StructData: Structured search data. StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Output only. The title of the document. + Title string `json:"title,omitempty"` + // Uri: Output only. The URI of the document. + Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -13555,7 +13730,7 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // DefaultSchemaId: Output only. The id of the default Schema associated to // this data store. DefaultSchemaId string `json:"defaultSchemaId,omitempty"` // DisplayName: Required. The data store display name. This field must be a @@ -13568,6 +13743,12 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // HealthcareFhirConfig: Optional. Configuration for `HEALTHCARE_FHIR` // vertical. HealthcareFhirConfig *GoogleCloudDiscoveryengineV1alphaHealthcareFhirConfig `json:"healthcareFhirConfig,omitempty"` + // IdentityMappingStore: Immutable. The fully qualified resource name of the + // associated IdentityMappingStore. This field can only be set for acl_enabled + // DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapp + // ing_store}`. + IdentityMappingStore string `json:"identityMappingStore,omitempty"` // IdpConfig: Output only. Data store level identity provider config. IdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfig `json:"idpConfig,omitempty"` // IndustryVertical: Immutable. The industry vertical that the data store @@ -14826,52 +15007,6 @@ func (s GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec) M return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse: Response message for -// SiteSearchEngineService.FetchSitemaps method. -type GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse struct { - // SitemapsMetadata: List of Sitemaps fetched. - SitemapsMetadata []*GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata `json:"sitemapsMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "SitemapsMetadata") 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. "SitemapsMetadata") 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 GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata: -// Contains a Sitemap and its metadata. -type GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata struct { - // Sitemap: The Sitemap. - Sitemap *GoogleCloudDiscoveryengineV1alphaSitemap `json:"sitemap,omitempty"` - // ForceSendFields is a list of field names (e.g. "Sitemap") 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. "Sitemap") 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 GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDiscoveryengineV1alphaFieldConfig: Configurations for fields of a // schema. For example, configuring a field is indexable, or searchable. type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { @@ -17805,7 +17940,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec struct { QueryId string `json:"queryId,omitempty"` // SearchResultPersistenceCount: The number of top search results to persist. // The persisted search results can be used for the subsequent /answer api - // call. This field is simliar to the `summary_result_count` field in + // call. This field is similar to the `summary_result_count` field in // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 // results for documents mode, or 50 for chunks mode. SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` @@ -19103,6 +19238,29 @@ func (s GoogleCloudDiscoveryengineV1betaControlSynonymsAction) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries: The historical crawl +// rate timeseries data, used for monitoring. +type GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries struct { + // QpsTimeSeries: The QPS of the crawl rate. + QpsTimeSeries *GoogleMonitoringV3TimeSeries `json:"qpsTimeSeries,omitempty"` + // ForceSendFields is a list of field names (e.g. "QpsTimeSeries") 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. "QpsTimeSeries") 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 GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to // the progress of the DataStoreService.CreateDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -19264,7 +19422,7 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // DefaultSchemaId: Output only. The id of the default Schema associated to // this data store. DefaultSchemaId string `json:"defaultSchemaId,omitempty"` // DisplayName: Required. The data store display name. This field must be a @@ -19277,6 +19435,12 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // HealthcareFhirConfig: Optional. Configuration for `HEALTHCARE_FHIR` // vertical. HealthcareFhirConfig *GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig `json:"healthcareFhirConfig,omitempty"` + // IdentityMappingStore: Immutable. The fully qualified resource name of the + // associated IdentityMappingStore. This field can only be set for acl_enabled + // DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapp + // ing_store}`. + IdentityMappingStore string `json:"identityMappingStore,omitempty"` // IndustryVertical: Immutable. The industry vertical that the data store // registers. // @@ -19412,6 +19576,38 @@ func (s GoogleCloudDiscoveryengineV1betaDataStoreServingConfigDataStore) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries: The historical +// dedicated crawl rate timeseries data, used for monitoring. Dedicated crawl +// is used by Vertex AI to crawl the user's website when dedicate crawl is set. +type GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries struct { + // AutoRefreshCrawlRate: Vertex AI's dedicated crawl rate time series of + // auto-refresh, which is the crawl rate of Google-CloudVertexBot when dedicate + // crawl is set, and the crawl rate is for best effort use cases like + // refreshing urls periodically. + AutoRefreshCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"autoRefreshCrawlRate,omitempty"` + // UserTriggeredCrawlRate: Vertex AI's dedicated crawl rate time series of user + // triggered crawl, which is the crawl rate of Google-CloudVertexBot when + // dedicate crawl is set, and user triggered crawl rate is for deterministic + // use cases like crawling urls or sitemaps specified by users. + UserTriggeredCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"userTriggeredCrawlRate,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoRefreshCrawlRate") 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. "AutoRefreshCrawlRate") 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 GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata related to // the progress of the DataStoreService.DeleteDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -20152,52 +20348,6 @@ func (s GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec) Ma return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse: Response message for -// SiteSearchEngineService.FetchSitemaps method. -type GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse struct { - // SitemapsMetadata: List of Sitemaps fetched. - SitemapsMetadata []*GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata `json:"sitemapsMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "SitemapsMetadata") 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. "SitemapsMetadata") 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 GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata: -// Contains a Sitemap and its metadata. -type GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata struct { - // Sitemap: The Sitemap. - Sitemap *GoogleCloudDiscoveryengineV1betaSitemap `json:"sitemap,omitempty"` - // ForceSendFields is a list of field names (e.g. "Sitemap") 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. "Sitemap") 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 GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig: Config to data store // for `HEALTHCARE_FHIR` vertical. type GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig struct { @@ -20719,6 +20869,79 @@ func (s GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse: Response message +// for CrawlRateManagementService.ObtainCrawlRate method. The response contains +// organcic or dedicated crawl rate time series data for monitoring, depending +// on whether dedicated crawl rate is set. +type GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse struct { + // DedicatedCrawlRateTimeSeries: The historical dedicated crawl rate timeseries + // data, used for monitoring. + DedicatedCrawlRateTimeSeries *GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries `json:"dedicatedCrawlRateTimeSeries,omitempty"` + // Error: Errors from service when handling the request. + Error *GoogleRpcStatus `json:"error,omitempty"` + // OrganicCrawlRateTimeSeries: The historical organic crawl rate timeseries + // data, used for monitoring. + OrganicCrawlRateTimeSeries *GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries `json:"organicCrawlRateTimeSeries,omitempty"` + // State: Output only. The state of the response. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "SUCCEEDED" - The state is successful. + // "FAILED" - The state is failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "DedicatedCrawlRateTimeSeries") 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. "DedicatedCrawlRateTimeSeries") 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 GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries: The historical +// organic crawl rate timeseries data, used for monitoring. Organic crawl is +// auto-determined by Google to crawl the user's website when dedicate crawl is +// not set. Crawl rate is the QPS of crawl request Google sends to the user's +// website. +type GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries struct { + // GoogleOrganicCrawlRate: Google's organic crawl rate time series, which is + // the sum of all googlebots' crawl rate. Please refer to + // https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers + // for more details about googlebots. + GoogleOrganicCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"googleOrganicCrawlRate,omitempty"` + // VertexAiOrganicCrawlRate: Vertex AI's organic crawl rate time series, which + // is the crawl rate of Google-CloudVertexBot when dedicate crawl is not set. + // Please refer to + // https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot + // for more details about Google-CloudVertexBot. + VertexAiOrganicCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"vertexAiOrganicCrawlRate,omitempty"` + // ForceSendFields is a list of field names (e.g. "GoogleOrganicCrawlRate") 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. "GoogleOrganicCrawlRate") 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 GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a // Google Cloud project in the service. type GoogleCloudDiscoveryengineV1betaProject struct { @@ -21025,6 +21248,66 @@ func (s *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics) UnmarshalJSO return nil } +// GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata: Metadata +// related to the progress of the +// CrawlRateManagementService.RemoveDedicatedCrawlRate operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse: Response +// message for CrawlRateManagementService.RemoveDedicatedCrawlRate method. It +// simply returns the state of the response, and an error message if the state +// is FAILED. +type GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse struct { + // Error: Errors from service when handling the request. + Error *GoogleRpcStatus `json:"error,omitempty"` + // State: Output only. The state of the response. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "SUCCEEDED" - The state is successful. + // "FAILED" - The state is failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and layout of // a type of document data. type GoogleCloudDiscoveryengineV1betaSchema struct { @@ -22236,7 +22519,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec struct { QueryId string `json:"queryId,omitempty"` // SearchResultPersistenceCount: The number of top search results to persist. // The persisted search results can be used for the subsequent /answer api - // call. This field is simliar to the `summary_result_count` field in + // call. This field is similar to the `summary_result_count` field in // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 // results for documents mode, or 50 for chunks mode. SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` @@ -22291,6 +22574,66 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata: Metadata +// related to the progress of the +// CrawlRateManagementService.SetDedicatedCrawlRate operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse: Response +// message for CrawlRateManagementService.SetDedicatedCrawlRate method. It +// simply returns the state of the response, and an error message if the state +// is FAILED. +type GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse struct { + // Error: Errors from service when handling the request. + Error *GoogleRpcStatus `json:"error,omitempty"` + // State: Output only. The state of the response. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "SUCCEEDED" - The state is successful. + // "FAILED" - The state is failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSingleRegionKey: Metadata for // single-regional CMEKs. type GoogleCloudDiscoveryengineV1betaSingleRegionKey struct { @@ -31326,6 +31669,332 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } } +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1sitemap *GoogleCloudDiscoveryengineV1Sitemap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Sitemap. +// +// - parent: Parent resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsService) Create(parent string, googleclouddiscoveryenginev1sitemap *GoogleCloudDiscoveryengineV1Sitemap) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1sitemap = googleclouddiscoveryenginev1sitemap + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall { + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1sitemap) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sitemaps") + 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", "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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", "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Sitemap. +// +// - name: Full resource name of Sitemap, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/sitemaps/{sitemap}`. If the caller does +// not have permission to access the Sitemap, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested Sitemap +// does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall{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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall { + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall) 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", "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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", "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Fetch: Fetch Sitemaps in a DataStore. +// +// - parent: Parent resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsService) Fetch(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The Sitemap uris. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall { + c.urlParams_.SetMulti("matcher.urisMatcher.uris", append([]string{}, matcherUrisMatcherUris...)) + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall { + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall { + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall) 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}/sitemaps:fetch") + 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", "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.fetch", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.fetch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1FetchSitemapsResponse.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSitemapsFetchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1FetchSitemapsResponse, 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 := &GoogleCloudDiscoveryengineV1FetchSitemapsResponse{ + 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", "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.sitemaps.fetch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { s *Service parent string @@ -43523,6 +44192,332 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ... return ret, nil } +type ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1sitemap *GoogleCloudDiscoveryengineV1Sitemap + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Sitemap. +// +// - parent: Parent resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineSitemapsService) Create(parent string, googleclouddiscoveryenginev1sitemap *GoogleCloudDiscoveryengineV1Sitemap) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1sitemap = googleclouddiscoveryenginev1sitemap + 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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall { + 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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1sitemap) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sitemaps") + 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", "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.create", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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", "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.create", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Sitemap. +// +// - name: Full resource name of Sitemap, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/sitemaps/{sitemap}`. If the caller does +// not have permission to access the Sitemap, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested Sitemap +// does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresSiteSearchEngineSitemapsService) Delete(name string) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall{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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall { + 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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall) 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", "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.delete", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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", "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.delete", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Fetch: Fetch Sitemaps in a DataStore. +// +// - parent: Parent resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineSitemapsService) Fetch(parent string) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The Sitemap uris. +func (c *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall { + c.urlParams_.SetMulti("matcher.urisMatcher.uris", append([]string{}, matcherUrisMatcherUris...)) + 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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall { + 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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall { + 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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall) 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}/sitemaps:fetch") + 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", "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.fetch", "request", internallog.HTTPRequest(req, nil)) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.fetch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1FetchSitemapsResponse.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 *ProjectsLocationsDataStoresSiteSearchEngineSitemapsFetchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1FetchSitemapsResponse, 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 := &GoogleCloudDiscoveryengineV1FetchSitemapsResponse{ + 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", "discoveryengine.projects.locations.dataStores.siteSearchEngine.sitemaps.fetch", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { s *Service parent string diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 2df096f69f1..1487d543219 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -4,6 +4,9 @@ "scopes": { "https://www.googleapis.com/auth/cloud-platform": { "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + }, + "https://www.googleapis.com/auth/cloud_search.query": { + "description": "Search your organization's data in the Cloud Search index" } } } @@ -1830,7 +1833,8 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_search.query" ] } } @@ -4198,6 +4202,35 @@ "response": { "$ref": "GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryResponse" }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_search.query" + ] + }, + "removeSuggestion": { + "description": "Removes the search history suggestion in an engine for a user. This will remove the suggestion from being returned in the AdvancedCompleteQueryResponse.recent_search_suggestions for this user. If the user searches the same suggestion again, the new history will override and suggest this suggestion again.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/completionConfig:removeSuggestion", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.completionConfig.removeSuggestion", + "parameterOrder": [ + "completionConfig" + ], + "parameters": { + "completionConfig": { + "description": "Required. The completion_config of the parent engine resource name for which the search history suggestion is to be removed, such as `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/completionConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+completionConfig}:removeSuggestion", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRemoveSuggestionRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRemoveSuggestionResponse" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] @@ -5990,7 +6023,8 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryResponse" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_search.query" ] } } @@ -8977,7 +9011,7 @@ } } }, - "revision": "20250211", + "revision": "20250214", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "ApiservingMediaRequestInfo": { @@ -10380,6 +10414,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1CreateSitemapMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1CreateSitemapMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata", @@ -10440,7 +10491,7 @@ "type": "string" }, "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "description": "Output only. The id of the default Schema associated to this data store.", "readOnly": true, "type": "string" }, @@ -10456,6 +10507,10 @@ "$ref": "GoogleCloudDiscoveryengineV1HealthcareFhirConfig", "description": "Optional. Configuration for `HEALTHCARE_FHIR` vertical." }, + "identityMappingStore": { + "description": "Immutable. The fully qualified resource name of the associated IdentityMappingStore. This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.", + "type": "string" + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -10653,6 +10708,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1DeleteSitemapMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DeleteSitemapMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata", @@ -11894,6 +11966,28 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1Sitemap": { + "description": "A sitemap for the SiteSearchEngine.", + "id": "GoogleCloudDiscoveryengineV1Sitemap", + "properties": { + "createTime": { + "description": "Output only. The sitemap's creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The fully qualified resource name of the sitemap. `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/*` The `sitemap_id` suffix is system-generated.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1TargetSite": { "description": "A target site for the SiteSearchEngine.", "id": "GoogleCloudDiscoveryengineV1TargetSite", @@ -12195,7 +12289,7 @@ "type": "string" }, "queryModel": { - "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + "description": "Specifies the autocomplete query model, which only applies to the QUERY SuggestionType. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", "type": "string" }, "suggestionTypeSpecs": { @@ -12625,7 +12719,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitation", "properties": { "endIndex": { - "description": "End of the attributed segment, exclusive.", + "description": "End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" }, @@ -12637,7 +12731,7 @@ "type": "array" }, "startIndex": { - "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" } @@ -13412,6 +13506,16 @@ }, "description": "Structured search data.", "type": "object" + }, + "title": { + "description": "Output only. The title of the document.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. The URI of the document.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -15540,7 +15644,7 @@ "type": "string" }, "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "description": "Output only. The id of the default Schema associated to this data store.", "readOnly": true, "type": "string" }, @@ -15556,6 +15660,10 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaHealthcareFhirConfig", "description": "Optional. Configuration for `HEALTHCARE_FHIR` vertical." }, + "identityMappingStore": { + "description": "Immutable. The fully qualified resource name of the associated IdentityMappingStore. This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.", + "type": "string" + }, "idpConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", "description": "Output only. Data store level identity provider config.", @@ -19634,6 +19742,40 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaRemoveSuggestionRequest": { + "description": "Request message for CompletionService.RemoveSuggestion method.", + "id": "GoogleCloudDiscoveryengineV1alphaRemoveSuggestionRequest", + "properties": { + "removeAllSearchHistorySuggestions": { + "description": "Remove all search history suggestions for the user.", + "type": "boolean" + }, + "removeTime": { + "description": "Optional. Time at which the suggestion was removed. If not set, the current time will be used.", + "format": "google-datetime", + "type": "string" + }, + "searchHistorySuggestion": { + "description": "The search history suggestion to be removed.", + "type": "string" + }, + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserInfo", + "description": "Optional. Information about the end user. This should be the same identifier information as UserEvent.user_info and SearchRequest.user_info." + }, + "userPseudoId": { + "description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRemoveSuggestionResponse": { + "description": "Response message for CompletionService.RemoveSuggestion method.", + "id": "GoogleCloudDiscoveryengineV1alphaRemoveSuggestionResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaReply": { "description": "Defines a reply message to user.", "id": "GoogleCloudDiscoveryengineV1alphaReply", @@ -20822,7 +20964,7 @@ "type": "string" }, "searchResultPersistenceCount": { - "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is similar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", "format": "int32", "type": "integer" } @@ -22879,7 +23021,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent", "properties": { "contentConfig": { - "description": "The content config of the data store.", + "description": "Output only. The content config of the data store.", "enum": [ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", @@ -22894,6 +23036,7 @@ "The data store is used for public website search.", "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], + "readOnly": true, "type": "string" }, "displayName": { @@ -22912,6 +23055,33 @@ "name": { "description": "The name of the data store. It should be data store resource name Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. For APIs under WidgetService, such as WidgetService.LookUpWidgetConfig, the project number and location part is erased in this field.", "type": "string" + }, + "workspaceType": { + "description": "Output only. Workspace Source Types for workspace data, retrieved from `DataStore.workspace_config.type`.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_CHAT", + "GOOGLE_GROUPS", + "GOOGLE_KEEP", + "GOOGLE_PEOPLE" + ], + "enumDescriptions": [ + "Defaults to an unspecified Workspace type.", + "Workspace Data Store contains Drive data", + "Workspace Data Store contains Mail data", + "Workspace Data Store contains Sites data", + "Workspace Data Store contains Calendar data", + "Workspace Data Store contains Chat data", + "Workspace Data Store contains Groups data", + "Workspace Data Store contains Keep data", + "Workspace Data Store contains People data" + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -23609,6 +23779,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries": { + "description": "The historical crawl rate timeseries data, used for monitoring.", + "id": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "properties": { + "qpsTimeSeries": { + "$ref": "GoogleMonitoringV3TimeSeries", + "description": "The QPS of the crawl rate." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata", @@ -23743,7 +23924,7 @@ "type": "string" }, "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "description": "Output only. The id of the default Schema associated to this data store.", "readOnly": true, "type": "string" }, @@ -23759,6 +23940,10 @@ "$ref": "GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig", "description": "Optional. Configuration for `HEALTHCARE_FHIR` vertical." }, + "identityMappingStore": { + "description": "Immutable. The fully qualified resource name of the associated IdentityMappingStore. This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.", + "type": "string" + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -23879,6 +24064,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries": { + "description": "The historical dedicated crawl rate timeseries data, used for monitoring. Dedicated crawl is used by Vertex AI to crawl the user's website when dedicate crawl is set.", + "id": "GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries", + "properties": { + "autoRefreshCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Vertex AI's dedicated crawl rate time series of auto-refresh, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is set, and the crawl rate is for best effort use cases like refreshing urls periodically." + }, + "userTriggeredCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Vertex AI's dedicated crawl rate time series of user triggered crawl, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is set, and user triggered crawl rate is for deterministic use cases like crawling urls or sitemaps specified by users." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata", @@ -24405,31 +24605,6 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse": { - "description": "Response message for SiteSearchEngineService.FetchSitemaps method.", - "id": "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse", - "properties": { - "sitemapsMetadata": { - "description": "List of Sitemaps fetched.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata": { - "description": "Contains a Sitemap and its metadata.", - "id": "GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata", - "properties": { - "sitemap": { - "$ref": "GoogleCloudDiscoveryengineV1betaSitemap", - "description": "The Sitemap." - } - }, - "type": "object" - }, "GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig": { "description": "Config to data store for `HEALTHCARE_FHIR` vertical.", "id": "GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig", @@ -24807,6 +24982,55 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse": { + "description": "Response message for CrawlRateManagementService.ObtainCrawlRate method. The response contains organcic or dedicated crawl rate time series data for monitoring, depending on whether dedicated crawl rate is set.", + "id": "GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse", + "properties": { + "dedicatedCrawlRateTimeSeries": { + "$ref": "GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries", + "description": "The historical dedicated crawl rate timeseries data, used for monitoring." + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Errors from service when handling the request." + }, + "organicCrawlRateTimeSeries": { + "$ref": "GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries", + "description": "The historical organic crawl rate timeseries data, used for monitoring." + }, + "state": { + "description": "Output only. The state of the response.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The state is successful.", + "The state is failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries": { + "description": "The historical organic crawl rate timeseries data, used for monitoring. Organic crawl is auto-determined by Google to crawl the user's website when dedicate crawl is not set. Crawl rate is the QPS of crawl request Google sends to the user's website.", + "id": "GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries", + "properties": { + "googleOrganicCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Google's organic crawl rate time series, which is the sum of all googlebots' crawl rate. Please refer to https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers for more details about googlebots." + }, + "vertexAiOrganicCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Vertex AI's organic crawl rate time series, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is not set. Please refer to https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot for more details about Google-CloudVertexBot." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaProject": { "description": "Metadata and configurations for a Google Cloud project in the service.", "id": "GoogleCloudDiscoveryengineV1betaProject", @@ -25027,6 +25251,49 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata": { + "description": "Metadata related to the progress of the CrawlRateManagementService.RemoveDedicatedCrawlRate operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse": { + "description": "Response message for CrawlRateManagementService.RemoveDedicatedCrawlRate method. It simply returns the state of the response, and an error message if the state is FAILED.", + "id": "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Errors from service when handling the request." + }, + "state": { + "description": "Output only. The state of the response.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The state is successful.", + "The state is failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSchema": { "description": "Defines the structure and layout of a type of document data.", "id": "GoogleCloudDiscoveryengineV1betaSchema", @@ -25769,7 +26036,7 @@ "type": "string" }, "searchResultPersistenceCount": { - "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is similar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", "format": "int32", "type": "integer" } @@ -25797,6 +26064,49 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata": { + "description": "Metadata related to the progress of the CrawlRateManagementService.SetDedicatedCrawlRate operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse": { + "description": "Response message for CrawlRateManagementService.SetDedicatedCrawlRate method. It simply returns the state of the response, and an error message if the state is FAILED.", + "id": "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Errors from service when handling the request." + }, + "state": { + "description": "Output only. The state of the response.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The state is successful.", + "The state is failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSingleRegionKey": { "description": "Metadata for single-regional CMEKs.", "id": "GoogleCloudDiscoveryengineV1betaSingleRegionKey", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 9db669167de..3516c6c5c5b 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -34,6 +34,11 @@ // // # Other authentication options // +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: +// +// discoveryengineService, err := discoveryengine.NewService(ctx, option.WithScopes(discoveryengine.CloudSearchQueryScope)) +// // To use an API key for authentication (note: some APIs do not support API // keys), use [google.golang.org/api/option.WithAPIKey]: // @@ -101,12 +106,16 @@ const ( // See, edit, configure, and delete your Google Cloud data and see the email // address for your Google Account. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" + + // Search your organization's data in the Cloud Search index + CloudSearchQueryScope = "https://www.googleapis.com/auth/cloud_search.query" ) // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { scopesOption := internaloption.WithDefaultScopes( "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_search.query", ) // NOTE: prepend, so we don't override user-specified scopes. opts = append([]option.ClientOption{scopesOption}, opts...) @@ -3109,6 +3118,33 @@ func (s GoogleCloudDiscoveryengineV1CreateSchemaMetadata) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1CreateSitemapMetadata: Metadata related to the +// progress of the SiteSearchEngineService.CreateSitemap operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1CreateSitemapMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1CreateSitemapMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CreateSitemapMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata: Metadata related to // the progress of the SiteSearchEngineService.CreateTargetSite operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -3158,7 +3194,7 @@ type GoogleCloudDiscoveryengineV1DataStore struct { ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // DefaultSchemaId: Output only. The id of the default Schema associated to // this data store. DefaultSchemaId string `json:"defaultSchemaId,omitempty"` // DisplayName: Required. The data store display name. This field must be a @@ -3171,6 +3207,12 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // HealthcareFhirConfig: Optional. Configuration for `HEALTHCARE_FHIR` // vertical. HealthcareFhirConfig *GoogleCloudDiscoveryengineV1HealthcareFhirConfig `json:"healthcareFhirConfig,omitempty"` + // IdentityMappingStore: Immutable. The fully qualified resource name of the + // associated IdentityMappingStore. This field can only be set for acl_enabled + // DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapp + // ing_store}`. + IdentityMappingStore string `json:"identityMappingStore,omitempty"` // IndustryVertical: Immutable. The industry vertical that the data store // registers. // @@ -3436,6 +3478,33 @@ func (s GoogleCloudDiscoveryengineV1DeleteSchemaMetadata) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1DeleteSitemapMetadata: Metadata related to the +// progress of the SiteSearchEngineService.DeleteSitemap operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1DeleteSitemapMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1DeleteSitemapMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1DeleteSitemapMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata: Metadata related to // the progress of the SiteSearchEngineService.DeleteTargetSite operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -5176,6 +5245,34 @@ func (s GoogleCloudDiscoveryengineV1SiteVerificationInfo) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1Sitemap: A sitemap for the SiteSearchEngine. +type GoogleCloudDiscoveryengineV1Sitemap struct { + // CreateTime: Output only. The sitemap's creation time. + CreateTime string `json:"createTime,omitempty"` + // Name: Output only. The fully qualified resource name of the sitemap. + // `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/ + // *` The `sitemap_id` suffix is system-generated. + Name string `json:"name,omitempty"` + // Uri: Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`. + Uri string `json:"uri,omitempty"` + // 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 GoogleCloudDiscoveryengineV1Sitemap) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Sitemap + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1TargetSite: A target site for the // SiteSearchEngine. type GoogleCloudDiscoveryengineV1TargetSite struct { @@ -5563,9 +5660,10 @@ type GoogleCloudDiscoveryengineV1alphaAdvancedCompleteQueryRequest struct { // prefix" feature, which returns user's recently searched queries given the // empty query. Query string `json:"query,omitempty"` - // QueryModel: Specifies the autocomplete data model. This overrides any model - // specified in the Configuration > Autocomplete section of the Cloud console. - // Currently supported values: * `document` - Using suggestions generated from + // QueryModel: Specifies the autocomplete query model, which only applies to + // the QUERY SuggestionType. This overrides any model specified in the + // Configuration > Autocomplete section of the Cloud console. Currently + // supported values: * `document` - Using suggestions generated from // user-imported documents. * `search-history` - Using suggestions generated // from the past history of SearchService.Search API calls. Do not use it when // there is no traffic for Search API. * `user-event` - Using suggestions @@ -6068,12 +6166,15 @@ func (s *GoogleCloudDiscoveryengineV1alphaAnswer) UnmarshalJSON(data []byte) err // GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a // segment. type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { - // EndIndex: End of the attributed segment, exclusive. + // EndIndex: End of the attributed segment, exclusive. Measured in bytes (UTF-8 + // unicode). If there are multi-byte characters,such as non-ASCII characters, + // the index measurement is longer than the string length. EndIndex int64 `json:"endIndex,omitempty,string"` // Sources: Citation sources for the attributed segment. Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` // StartIndex: Index indicates the start of the segment, measured in bytes - // (UTF-8 unicode). + // (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII + // characters, the index measurement is longer than the string length. StartIndex int64 `json:"startIndex,omitempty,string"` // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with empty or @@ -7198,6 +7299,10 @@ type GoogleCloudDiscoveryengineV1alphaAnswerReferenceStructuredDocumentInfo stru Document string `json:"document,omitempty"` // StructData: Structured search data. StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Output only. The title of the document. + Title string `json:"title,omitempty"` + // Uri: Output only. The URI of the document. + Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -9956,7 +10061,7 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // DefaultSchemaId: Output only. The id of the default Schema associated to // this data store. DefaultSchemaId string `json:"defaultSchemaId,omitempty"` // DisplayName: Required. The data store display name. This field must be a @@ -9969,6 +10074,12 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // HealthcareFhirConfig: Optional. Configuration for `HEALTHCARE_FHIR` // vertical. HealthcareFhirConfig *GoogleCloudDiscoveryengineV1alphaHealthcareFhirConfig `json:"healthcareFhirConfig,omitempty"` + // IdentityMappingStore: Immutable. The fully qualified resource name of the + // associated IdentityMappingStore. This field can only be set for acl_enabled + // DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapp + // ing_store}`. + IdentityMappingStore string `json:"identityMappingStore,omitempty"` // IdpConfig: Output only. Data store level identity provider config. IdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfig `json:"idpConfig,omitempty"` // IndustryVertical: Immutable. The industry vertical that the data store @@ -16037,6 +16148,56 @@ func (s GoogleCloudDiscoveryengineV1alphaRemoveDedicatedCrawlRateResponse) Marsh return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaRemoveSuggestionRequest: Request message +// for CompletionService.RemoveSuggestion method. +type GoogleCloudDiscoveryengineV1alphaRemoveSuggestionRequest struct { + // RemoveAllSearchHistorySuggestions: Remove all search history suggestions for + // the user. + RemoveAllSearchHistorySuggestions bool `json:"removeAllSearchHistorySuggestions,omitempty"` + // RemoveTime: Optional. Time at which the suggestion was removed. If not set, + // the current time will be used. + RemoveTime string `json:"removeTime,omitempty"` + // SearchHistorySuggestion: The search history suggestion to be removed. + SearchHistorySuggestion string `json:"searchHistorySuggestion,omitempty"` + // UserInfo: Optional. Information about the end user. This should be the same + // identifier information as UserEvent.user_info and SearchRequest.user_info. + UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + // UserPseudoId: Required. A unique identifier for tracking visitors. For + // example, this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique identifier + // should not change if the visitor logs in or out of the website. This field + // should NOT have a fixed value such as `unknown_visitor`. This should be the + // same identifier as UserEvent.user_pseudo_id and + // SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with + // a length limit of 128. + UserPseudoId string `json:"userPseudoId,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RemoveAllSearchHistorySuggestions") 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. + // "RemoveAllSearchHistorySuggestions") 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 GoogleCloudDiscoveryengineV1alphaRemoveSuggestionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRemoveSuggestionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaRemoveSuggestionResponse: Response message +// for CompletionService.RemoveSuggestion method. +type GoogleCloudDiscoveryengineV1alphaRemoveSuggestionResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + // GoogleCloudDiscoveryengineV1alphaReply: Defines a reply message to user. type GoogleCloudDiscoveryengineV1alphaReply struct { // References: References in the reply. @@ -17829,7 +17990,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec struct { QueryId string `json:"queryId,omitempty"` // SearchResultPersistenceCount: The number of top search results to persist. // The persisted search results can be used for the subsequent /answer api - // call. This field is simliar to the `summary_result_count` field in + // call. This field is similar to the `summary_result_count` field in // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 // results for documents mode, or 50 for chunks mode. SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` @@ -20526,7 +20687,7 @@ func (s GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent) Marsha // data store component that contains data stores fields that may be used for // filtering, it's the child of `CollectionComponent`. type GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent struct { - // ContentConfig: The content config of the data store. + // ContentConfig: Output only. The content config of the data store. // // Possible values: // "CONTENT_CONFIG_UNSPECIFIED" - Default value. @@ -20552,6 +20713,20 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent struct { // WidgetService.LookUpWidgetConfig, the project number and location part is // erased in this field. Name string `json:"name,omitempty"` + // WorkspaceType: Output only. Workspace Source Types for workspace data, + // retrieved from `DataStore.workspace_config.type`. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Defaults to an unspecified Workspace type. + // "GOOGLE_DRIVE" - Workspace Data Store contains Drive data + // "GOOGLE_MAIL" - Workspace Data Store contains Mail data + // "GOOGLE_SITES" - Workspace Data Store contains Sites data + // "GOOGLE_CALENDAR" - Workspace Data Store contains Calendar data + // "GOOGLE_CHAT" - Workspace Data Store contains Chat data + // "GOOGLE_GROUPS" - Workspace Data Store contains Groups data + // "GOOGLE_KEEP" - Workspace Data Store contains Keep data + // "GOOGLE_PEOPLE" - Workspace Data Store contains People data + WorkspaceType string `json:"workspaceType,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -21489,6 +21664,29 @@ func (s GoogleCloudDiscoveryengineV1betaControlSynonymsAction) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries: The historical crawl +// rate timeseries data, used for monitoring. +type GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries struct { + // QpsTimeSeries: The QPS of the crawl rate. + QpsTimeSeries *GoogleMonitoringV3TimeSeries `json:"qpsTimeSeries,omitempty"` + // ForceSendFields is a list of field names (e.g. "QpsTimeSeries") 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. "QpsTimeSeries") 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 GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to // the progress of the DataStoreService.CreateDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -21650,7 +21848,7 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // DefaultSchemaId: Output only. The id of the default Schema associated to // this data store. DefaultSchemaId string `json:"defaultSchemaId,omitempty"` // DisplayName: Required. The data store display name. This field must be a @@ -21663,6 +21861,12 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // HealthcareFhirConfig: Optional. Configuration for `HEALTHCARE_FHIR` // vertical. HealthcareFhirConfig *GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig `json:"healthcareFhirConfig,omitempty"` + // IdentityMappingStore: Immutable. The fully qualified resource name of the + // associated IdentityMappingStore. This field can only be set for acl_enabled + // DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapp + // ing_store}`. + IdentityMappingStore string `json:"identityMappingStore,omitempty"` // IndustryVertical: Immutable. The industry vertical that the data store // registers. // @@ -21798,6 +22002,38 @@ func (s GoogleCloudDiscoveryengineV1betaDataStoreServingConfigDataStore) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries: The historical +// dedicated crawl rate timeseries data, used for monitoring. Dedicated crawl +// is used by Vertex AI to crawl the user's website when dedicate crawl is set. +type GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries struct { + // AutoRefreshCrawlRate: Vertex AI's dedicated crawl rate time series of + // auto-refresh, which is the crawl rate of Google-CloudVertexBot when dedicate + // crawl is set, and the crawl rate is for best effort use cases like + // refreshing urls periodically. + AutoRefreshCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"autoRefreshCrawlRate,omitempty"` + // UserTriggeredCrawlRate: Vertex AI's dedicated crawl rate time series of user + // triggered crawl, which is the crawl rate of Google-CloudVertexBot when + // dedicate crawl is set, and user triggered crawl rate is for deterministic + // use cases like crawling urls or sitemaps specified by users. + UserTriggeredCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"userTriggeredCrawlRate,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoRefreshCrawlRate") 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. "AutoRefreshCrawlRate") 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 GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata related to // the progress of the DataStoreService.DeleteDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -22538,52 +22774,6 @@ func (s GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec) Ma return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse: Response message for -// SiteSearchEngineService.FetchSitemaps method. -type GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse struct { - // SitemapsMetadata: List of Sitemaps fetched. - SitemapsMetadata []*GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata `json:"sitemapsMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "SitemapsMetadata") 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. "SitemapsMetadata") 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 GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFetchSitemapsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata: -// Contains a Sitemap and its metadata. -type GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata struct { - // Sitemap: The Sitemap. - Sitemap *GoogleCloudDiscoveryengineV1betaSitemap `json:"sitemap,omitempty"` - // ForceSendFields is a list of field names (e.g. "Sitemap") 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. "Sitemap") 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 GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFetchSitemapsResponseSitemapMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig: Config to data store // for `HEALTHCARE_FHIR` vertical. type GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig struct { @@ -23105,6 +23295,79 @@ func (s GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse: Response message +// for CrawlRateManagementService.ObtainCrawlRate method. The response contains +// organcic or dedicated crawl rate time series data for monitoring, depending +// on whether dedicated crawl rate is set. +type GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse struct { + // DedicatedCrawlRateTimeSeries: The historical dedicated crawl rate timeseries + // data, used for monitoring. + DedicatedCrawlRateTimeSeries *GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries `json:"dedicatedCrawlRateTimeSeries,omitempty"` + // Error: Errors from service when handling the request. + Error *GoogleRpcStatus `json:"error,omitempty"` + // OrganicCrawlRateTimeSeries: The historical organic crawl rate timeseries + // data, used for monitoring. + OrganicCrawlRateTimeSeries *GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries `json:"organicCrawlRateTimeSeries,omitempty"` + // State: Output only. The state of the response. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "SUCCEEDED" - The state is successful. + // "FAILED" - The state is failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "DedicatedCrawlRateTimeSeries") 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. "DedicatedCrawlRateTimeSeries") 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 GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries: The historical +// organic crawl rate timeseries data, used for monitoring. Organic crawl is +// auto-determined by Google to crawl the user's website when dedicate crawl is +// not set. Crawl rate is the QPS of crawl request Google sends to the user's +// website. +type GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries struct { + // GoogleOrganicCrawlRate: Google's organic crawl rate time series, which is + // the sum of all googlebots' crawl rate. Please refer to + // https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers + // for more details about googlebots. + GoogleOrganicCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"googleOrganicCrawlRate,omitempty"` + // VertexAiOrganicCrawlRate: Vertex AI's organic crawl rate time series, which + // is the crawl rate of Google-CloudVertexBot when dedicate crawl is not set. + // Please refer to + // https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot + // for more details about Google-CloudVertexBot. + VertexAiOrganicCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"vertexAiOrganicCrawlRate,omitempty"` + // ForceSendFields is a list of field names (e.g. "GoogleOrganicCrawlRate") 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. "GoogleOrganicCrawlRate") 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 GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a // Google Cloud project in the service. type GoogleCloudDiscoveryengineV1betaProject struct { @@ -23411,6 +23674,66 @@ func (s *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics) UnmarshalJSO return nil } +// GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata: Metadata +// related to the progress of the +// CrawlRateManagementService.RemoveDedicatedCrawlRate operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse: Response +// message for CrawlRateManagementService.RemoveDedicatedCrawlRate method. It +// simply returns the state of the response, and an error message if the state +// is FAILED. +type GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse struct { + // Error: Errors from service when handling the request. + Error *GoogleRpcStatus `json:"error,omitempty"` + // State: Output only. The state of the response. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "SUCCEEDED" - The state is successful. + // "FAILED" - The state is failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and layout of // a type of document data. type GoogleCloudDiscoveryengineV1betaSchema struct { @@ -24622,7 +24945,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec struct { QueryId string `json:"queryId,omitempty"` // SearchResultPersistenceCount: The number of top search results to persist. // The persisted search results can be used for the subsequent /answer api - // call. This field is simliar to the `summary_result_count` field in + // call. This field is similar to the `summary_result_count` field in // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 // results for documents mode, or 50 for chunks mode. SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` @@ -24677,6 +25000,66 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata: Metadata +// related to the progress of the +// CrawlRateManagementService.SetDedicatedCrawlRate operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse: Response +// message for CrawlRateManagementService.SetDedicatedCrawlRate method. It +// simply returns the state of the response, and an error message if the state +// is FAILED. +type GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse struct { + // Error: Errors from service when handling the request. + Error *GoogleRpcStatus `json:"error,omitempty"` + // State: Output only. The state of the response. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "SUCCEEDED" - The state is successful. + // "FAILED" - The state is failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSingleRegionKey: Metadata for // single-regional CMEKs. type GoogleCloudDiscoveryengineV1betaSingleRegionKey struct { @@ -41005,6 +41388,117 @@ func (c *ProjectsLocationsCollectionsEnginesCompletionConfigCompleteQueryCall) D return ret, nil } +type ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall struct { + s *Service + completionConfig string + googleclouddiscoveryenginev1alpharemovesuggestionrequest *GoogleCloudDiscoveryengineV1alphaRemoveSuggestionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveSuggestion: Removes the search history suggestion in an engine for a +// user. This will remove the suggestion from being returned in the +// AdvancedCompleteQueryResponse.recent_search_suggestions for this user. If +// the user searches the same suggestion again, the new history will override +// and suggest this suggestion again. +// +// - completionConfig: The completion_config of the parent engine resource name +// for which the search history suggestion is to be removed, such as +// `projects/*/locations/global/collections/default_collection/engines/*/compl +// etionConfig`. +func (r *ProjectsLocationsCollectionsEnginesCompletionConfigService) RemoveSuggestion(completionConfig string, googleclouddiscoveryenginev1alpharemovesuggestionrequest *GoogleCloudDiscoveryengineV1alphaRemoveSuggestionRequest) *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall { + c := &ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.completionConfig = completionConfig + c.googleclouddiscoveryenginev1alpharemovesuggestionrequest = googleclouddiscoveryenginev1alpharemovesuggestionrequest + 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 *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall { + 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 *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1alpharemovesuggestionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+completionConfig}:removeSuggestion") + 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{ + "completionConfig": c.completionConfig, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.completionConfig.removeSuggestion", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.completionConfig.removeSuggestion" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaRemoveSuggestionResponse.ServerResponse.Hea +// der 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 *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRemoveSuggestionResponse, 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 := &GoogleCloudDiscoveryengineV1alphaRemoveSuggestionResponse{ + 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", "discoveryengine.projects.locations.collections.engines.completionConfig.removeSuggestion", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { s *Service parent string diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 54ef4fbdbdd..e91fe261951 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -188,6 +188,90 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "obtainCrawlRate": { + "description": "Obtains the time series data of organic or dedicated crawl rate for monitoring. When dedicated crawl rate is not set, it will return vertex AI's organic crawl rate time series. Organic crawl means Google automatically crawl the internet at its own convenience. When dedicated crawl rate is set, it will return vertex AI's dedicated crawl rate time series.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}:obtainCrawlRate", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.obtainCrawlRate", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The location resource where crawl rate management will be performed. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+location}:obtainCrawlRate", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaObtainCrawlRateRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "removeDedicatedCrawlRate": { + "description": "Removes the dedicated crawl rate for a craw_rate_scope. If the dedicated crawl rate was set, this will disable vertex AI's crawl bot from using the dedicated crawl rate for crawling. If the dedicated crawl rate was not set, this is a no-op.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}:removeDedicatedCrawlRate", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.removeDedicatedCrawlRate", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The location resource where crawl rate management will be performed. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+location}:removeDedicatedCrawlRate", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setDedicatedCrawlRate": { + "description": "Sets the dedicated crawl rate for a crawl_rate_scope. If the dedicated crawl rate was not set, this will enable vertex AI's crawl bot to use the new dedicated crawl rate for crawling. If the dedicated crawl rate was set, vertex AI's crawl bot will try to update the rate to the new value. If the new value is too high, the crawl bot may crawl at a lower rate to avoid overloading the user's website.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}:setDedicatedCrawlRate", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.setDedicatedCrawlRate", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The location resource where crawl rate management will be performed. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+location}:setDedicatedCrawlRate", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -3217,6 +3301,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "removeSuggestion": { + "description": "Removes the search history suggestion in an engine for a user. This will remove the suggestion from being returned in the AdvancedCompleteQueryResponse.recent_search_suggestions for this user. If the user searches the same suggestion again, the new history will override and suggest this suggestion again.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/completionConfig:removeSuggestion", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.completionConfig.removeSuggestion", + "parameterOrder": [ + "completionConfig" + ], + "parameters": { + "completionConfig": { + "description": "Required. The completion_config of the parent engine resource name for which the search history suggestion is to be removed, such as `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/completionConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+completionConfig}:removeSuggestion", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaRemoveSuggestionRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaRemoveSuggestionResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -7638,7 +7750,7 @@ } } }, - "revision": "20250211", + "revision": "20250214", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -8459,6 +8571,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1CreateSitemapMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1CreateSitemapMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata", @@ -8519,7 +8648,7 @@ "type": "string" }, "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "description": "Output only. The id of the default Schema associated to this data store.", "readOnly": true, "type": "string" }, @@ -8535,6 +8664,10 @@ "$ref": "GoogleCloudDiscoveryengineV1HealthcareFhirConfig", "description": "Optional. Configuration for `HEALTHCARE_FHIR` vertical." }, + "identityMappingStore": { + "description": "Immutable. The fully qualified resource name of the associated IdentityMappingStore. This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.", + "type": "string" + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -8732,6 +8865,23 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1DeleteSitemapMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DeleteSitemapMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata", @@ -9973,6 +10123,28 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1Sitemap": { + "description": "A sitemap for the SiteSearchEngine.", + "id": "GoogleCloudDiscoveryengineV1Sitemap", + "properties": { + "createTime": { + "description": "Output only. The sitemap's creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The fully qualified resource name of the sitemap. `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/*` The `sitemap_id` suffix is system-generated.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1TargetSite": { "description": "A target site for the SiteSearchEngine.", "id": "GoogleCloudDiscoveryengineV1TargetSite", @@ -10404,7 +10576,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitation", "properties": { "endIndex": { - "description": "End of the attributed segment, exclusive.", + "description": "End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" }, @@ -10416,7 +10588,7 @@ "type": "array" }, "startIndex": { - "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" } @@ -10599,6 +10771,16 @@ }, "description": "Structured search data.", "type": "object" + }, + "title": { + "description": "Output only. The title of the document.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. The URI of the document.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -11771,7 +11953,7 @@ "type": "string" }, "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "description": "Output only. The id of the default Schema associated to this data store.", "readOnly": true, "type": "string" }, @@ -11787,6 +11969,10 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaHealthcareFhirConfig", "description": "Optional. Configuration for `HEALTHCARE_FHIR` vertical." }, + "identityMappingStore": { + "description": "Immutable. The fully qualified resource name of the associated IdentityMappingStore. This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.", + "type": "string" + }, "idpConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", "description": "Output only. Data store level identity provider config.", @@ -12687,31 +12873,6 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse": { - "description": "Response message for SiteSearchEngineService.FetchSitemaps method.", - "id": "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse", - "properties": { - "sitemapsMetadata": { - "description": "List of Sitemaps fetched.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata": { - "description": "Contains a Sitemap and its metadata.", - "id": "GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata", - "properties": { - "sitemap": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSitemap", - "description": "The Sitemap." - } - }, - "type": "object" - }, "GoogleCloudDiscoveryengineV1alphaFieldConfig": { "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", @@ -14777,7 +14938,7 @@ "type": "string" }, "searchResultPersistenceCount": { - "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is similar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", "format": "int32", "type": "integer" } @@ -15343,7 +15504,7 @@ "type": "string" }, "queryModel": { - "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + "description": "Specifies the autocomplete query model, which only applies to the QUERY SuggestionType. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", "type": "string" }, "suggestionTypeSpecs": { @@ -15773,7 +15934,7 @@ "id": "GoogleCloudDiscoveryengineV1betaAnswerCitation", "properties": { "endIndex": { - "description": "End of the attributed segment, exclusive.", + "description": "End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" }, @@ -15785,7 +15946,7 @@ "type": "array" }, "startIndex": { - "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.", "format": "int64", "type": "string" } @@ -16556,6 +16717,16 @@ }, "description": "Structured search data.", "type": "object" + }, + "title": { + "description": "Output only. The title of the document.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. The URI of the document.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -17922,6 +18093,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries": { + "description": "The historical crawl rate timeseries data, used for monitoring.", + "id": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "properties": { + "qpsTimeSeries": { + "$ref": "GoogleMonitoringV3TimeSeries", + "description": "The QPS of the crawl rate." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata", @@ -18160,7 +18342,7 @@ "type": "string" }, "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "description": "Output only. The id of the default Schema associated to this data store.", "readOnly": true, "type": "string" }, @@ -18176,6 +18358,10 @@ "$ref": "GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig", "description": "Optional. Configuration for `HEALTHCARE_FHIR` vertical." }, + "identityMappingStore": { + "description": "Immutable. The fully qualified resource name of the associated IdentityMappingStore. This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.", + "type": "string" + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -18296,6 +18482,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries": { + "description": "The historical dedicated crawl rate timeseries data, used for monitoring. Dedicated crawl is used by Vertex AI to crawl the user's website when dedicate crawl is set.", + "id": "GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries", + "properties": { + "autoRefreshCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Vertex AI's dedicated crawl rate time series of auto-refresh, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is set, and the crawl rate is for best effort use cases like refreshing urls periodically." + }, + "userTriggeredCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Vertex AI's dedicated crawl rate time series of user triggered crawl, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is set, and user triggered crawl rate is for deterministic use cases like crawling urls or sitemaps specified by users." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata", @@ -20577,6 +20778,66 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaObtainCrawlRateRequest": { + "description": "Request message for CrawlRateManagementService.ObtainCrawlRate method.", + "id": "GoogleCloudDiscoveryengineV1betaObtainCrawlRateRequest", + "properties": { + "crawlRateScope": { + "description": "Required. The scope of the crawl rate that the user wants to monitor. Currently, only domain and host name are supported. A domain name example: `example.com`. A host name example: `www.example.com`. Please do not include `/` in the domain or host name.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse": { + "description": "Response message for CrawlRateManagementService.ObtainCrawlRate method. The response contains organcic or dedicated crawl rate time series data for monitoring, depending on whether dedicated crawl rate is set.", + "id": "GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse", + "properties": { + "dedicatedCrawlRateTimeSeries": { + "$ref": "GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries", + "description": "The historical dedicated crawl rate timeseries data, used for monitoring." + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Errors from service when handling the request." + }, + "organicCrawlRateTimeSeries": { + "$ref": "GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries", + "description": "The historical organic crawl rate timeseries data, used for monitoring." + }, + "state": { + "description": "Output only. The state of the response.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The state is successful.", + "The state is failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries": { + "description": "The historical organic crawl rate timeseries data, used for monitoring. Organic crawl is auto-determined by Google to crawl the user's website when dedicate crawl is not set. Crawl rate is the QPS of crawl request Google sends to the user's website.", + "id": "GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries", + "properties": { + "googleOrganicCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Google's organic crawl rate time series, which is the sum of all googlebots' crawl rate. Please refer to https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers for more details about googlebots." + }, + "vertexAiOrganicCrawlRate": { + "$ref": "GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries", + "description": "Vertex AI's organic crawl rate time series, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is not set. Please refer to https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot for more details about Google-CloudVertexBot." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaPageInfo": { "description": "Detailed page information.", "id": "GoogleCloudDiscoveryengineV1betaPageInfo", @@ -21183,6 +21444,94 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata": { + "description": "Metadata related to the progress of the CrawlRateManagementService.RemoveDedicatedCrawlRate operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateRequest": { + "description": "Request message for CrawlRateManagementService.RemoveDedicatedCrawlRate method. The user can remove the dedicated crawl rate for a crawl_rate_scope they own, and Google will fall back to organic crawl, and the crawl rate will be determined by Google.", + "id": "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateRequest", + "properties": { + "crawlRateScope": { + "description": "Required. The scope of the crawl rate change. Currently, only domain and host name are supported. A domain name example: `example.com`. A host name example: `www.example.com`. Please do not include `/` in the domain or host name.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse": { + "description": "Response message for CrawlRateManagementService.RemoveDedicatedCrawlRate method. It simply returns the state of the response, and an error message if the state is FAILED.", + "id": "GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Errors from service when handling the request." + }, + "state": { + "description": "Output only. The state of the response.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The state is successful.", + "The state is failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaRemoveSuggestionRequest": { + "description": "Request message for CompletionService.RemoveSuggestion method.", + "id": "GoogleCloudDiscoveryengineV1betaRemoveSuggestionRequest", + "properties": { + "removeAllSearchHistorySuggestions": { + "description": "Remove all search history suggestions for the user.", + "type": "boolean" + }, + "removeTime": { + "description": "Optional. Time at which the suggestion was removed. If not set, the current time will be used.", + "format": "google-datetime", + "type": "string" + }, + "searchHistorySuggestion": { + "description": "The search history suggestion to be removed.", + "type": "string" + }, + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserInfo", + "description": "Optional. Information about the end user. This should be the same identifier information as UserEvent.user_info and SearchRequest.user_info." + }, + "userPseudoId": { + "description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaRemoveSuggestionResponse": { + "description": "Response message for CompletionService.RemoveSuggestion method.", + "id": "GoogleCloudDiscoveryengineV1betaRemoveSuggestionResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaReply": { "description": "Defines a reply message to user.", "id": "GoogleCloudDiscoveryengineV1betaReply", @@ -22172,7 +22521,7 @@ "type": "string" }, "searchResultPersistenceCount": { - "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is similar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", "format": "int32", "type": "integer" } @@ -23104,6 +23453,93 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata": { + "description": "Metadata related to the progress of the CrawlRateManagementService.SetDedicatedCrawlRate operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateRequest": { + "description": "Request message for CrawlRateManagementService.SetDedicatedCrawlRate method. The user can set the crawl rate for a crawl_rate_scope they own. They can set up an overall crawl rate, or set up a user-triggered crawl rate and a auto-refresh crawl rate separately. If an overall crawl rate is set, Vertex AI will automatically splits crawl_rate into user-triggered and auto-refresh.", + "id": "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateRequest", + "properties": { + "crawlRate": { + "description": "Optional. The crawl QPS set by the user. It is not guaranteed that Vertex crawl bot will crawl at this QPS. If the crawl rate is too high, the real QPS may be lower than the value set by the user to avoid overloading the user's website.", + "format": "int32", + "type": "integer" + }, + "crawlRateScope": { + "description": "Required. The scope of the crawl rate that the user wants to config. Currently, only domain and host name are supported. A domain name example: `example.com`. A host name example: `www.example.com`. Please do not include `/` in the domain or host name.", + "type": "string" + }, + "crawlType": { + "description": "Optional. Whether it's the crawl rate of user-triggered or auto-refresh.", + "enum": [ + "CRAWL_TYPE_UNSPECIFIED", + "USER_TRIGGERED", + "AUTO_REFRESH" + ], + "enumDescriptions": [ + "The crawl type is unspecified.", + "The crawl type is user-triggered.", + "The crawl type is auto-refresh." + ], + "type": "string" + }, + "mode": { + "description": "Optional. Whether the rate is explicitly set by users, or set by vertex AI.", + "enum": [ + "MODE_UNSPECIFIED", + "AUTOMATIC", + "EXPLICIT" + ], + "enumDescriptions": [ + "The mode is unspecified. If the user does not specify the mode, default to AUTOMATIC.", + "Vertex AI automatically splits crawl_rate into user-triggered and auto-refresh. Users don't need to specify SetDedicatedCrawlRateRequest.CrawlType if the mode is AUTOMATIC.", + "Users explicitly set user-triggered or auto-refresh crawl rate." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse": { + "description": "Response message for CrawlRateManagementService.SetDedicatedCrawlRate method. It simply returns the state of the response, and an error message if the state is FAILED.", + "id": "GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse", + "properties": { + "error": { + "$ref": "GoogleRpcStatus", + "description": "Errors from service when handling the request." + }, + "state": { + "description": "Output only. The state of the response.", + "enum": [ + "STATE_UNSPECIFIED", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The state is successful.", + "The state is failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSingleRegionKey": { "description": "Metadata for single-regional CMEKs.", "id": "GoogleCloudDiscoveryengineV1betaSingleRegionKey", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 56b938a7744..32ba7d50f76 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -2307,6 +2307,33 @@ func (s GoogleCloudDiscoveryengineV1CreateSchemaMetadata) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1CreateSitemapMetadata: Metadata related to the +// progress of the SiteSearchEngineService.CreateSitemap operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1CreateSitemapMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1CreateSitemapMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CreateSitemapMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata: Metadata related to // the progress of the SiteSearchEngineService.CreateTargetSite operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -2356,7 +2383,7 @@ type GoogleCloudDiscoveryengineV1DataStore struct { ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // DefaultSchemaId: Output only. The id of the default Schema associated to // this data store. DefaultSchemaId string `json:"defaultSchemaId,omitempty"` // DisplayName: Required. The data store display name. This field must be a @@ -2369,6 +2396,12 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // HealthcareFhirConfig: Optional. Configuration for `HEALTHCARE_FHIR` // vertical. HealthcareFhirConfig *GoogleCloudDiscoveryengineV1HealthcareFhirConfig `json:"healthcareFhirConfig,omitempty"` + // IdentityMappingStore: Immutable. The fully qualified resource name of the + // associated IdentityMappingStore. This field can only be set for acl_enabled + // DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapp + // ing_store}`. + IdentityMappingStore string `json:"identityMappingStore,omitempty"` // IndustryVertical: Immutable. The industry vertical that the data store // registers. // @@ -2634,6 +2667,33 @@ func (s GoogleCloudDiscoveryengineV1DeleteSchemaMetadata) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1DeleteSitemapMetadata: Metadata related to the +// progress of the SiteSearchEngineService.DeleteSitemap operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1DeleteSitemapMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1DeleteSitemapMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1DeleteSitemapMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata: Metadata related to // the progress of the SiteSearchEngineService.DeleteTargetSite operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -4374,6 +4434,34 @@ func (s GoogleCloudDiscoveryengineV1SiteVerificationInfo) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1Sitemap: A sitemap for the SiteSearchEngine. +type GoogleCloudDiscoveryengineV1Sitemap struct { + // CreateTime: Output only. The sitemap's creation time. + CreateTime string `json:"createTime,omitempty"` + // Name: Output only. The fully qualified resource name of the sitemap. + // `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/ + // *` The `sitemap_id` suffix is system-generated. + Name string `json:"name,omitempty"` + // Uri: Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`. + Uri string `json:"uri,omitempty"` + // 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 GoogleCloudDiscoveryengineV1Sitemap) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Sitemap + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1TargetSite: A target site for the // SiteSearchEngine. type GoogleCloudDiscoveryengineV1TargetSite struct { @@ -4867,12 +4955,15 @@ func (s *GoogleCloudDiscoveryengineV1alphaAnswer) UnmarshalJSON(data []byte) err // GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a // segment. type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { - // EndIndex: End of the attributed segment, exclusive. + // EndIndex: End of the attributed segment, exclusive. Measured in bytes (UTF-8 + // unicode). If there are multi-byte characters,such as non-ASCII characters, + // the index measurement is longer than the string length. EndIndex int64 `json:"endIndex,omitempty,string"` // Sources: Citation sources for the attributed segment. Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` // StartIndex: Index indicates the start of the segment, measured in bytes - // (UTF-8 unicode). + // (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII + // characters, the index measurement is longer than the string length. StartIndex int64 `json:"startIndex,omitempty,string"` // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with empty or @@ -5133,6 +5224,10 @@ type GoogleCloudDiscoveryengineV1alphaAnswerReferenceStructuredDocumentInfo stru Document string `json:"document,omitempty"` // StructData: Structured search data. StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Output only. The title of the document. + Title string `json:"title,omitempty"` + // Uri: Output only. The URI of the document. + Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -6559,7 +6654,7 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // DefaultSchemaId: Output only. The id of the default Schema associated to // this data store. DefaultSchemaId string `json:"defaultSchemaId,omitempty"` // DisplayName: Required. The data store display name. This field must be a @@ -6572,6 +6667,12 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // HealthcareFhirConfig: Optional. Configuration for `HEALTHCARE_FHIR` // vertical. HealthcareFhirConfig *GoogleCloudDiscoveryengineV1alphaHealthcareFhirConfig `json:"healthcareFhirConfig,omitempty"` + // IdentityMappingStore: Immutable. The fully qualified resource name of the + // associated IdentityMappingStore. This field can only be set for acl_enabled + // DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapp + // ing_store}`. + IdentityMappingStore string `json:"identityMappingStore,omitempty"` // IdpConfig: Output only. Data store level identity provider config. IdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfig `json:"idpConfig,omitempty"` // IndustryVertical: Immutable. The industry vertical that the data store @@ -7830,52 +7931,6 @@ func (s GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec) M return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse: Response message for -// SiteSearchEngineService.FetchSitemaps method. -type GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse struct { - // SitemapsMetadata: List of Sitemaps fetched. - SitemapsMetadata []*GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata `json:"sitemapsMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "SitemapsMetadata") 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. "SitemapsMetadata") 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 GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata: -// Contains a Sitemap and its metadata. -type GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata struct { - // Sitemap: The Sitemap. - Sitemap *GoogleCloudDiscoveryengineV1alphaSitemap `json:"sitemap,omitempty"` - // ForceSendFields is a list of field names (e.g. "Sitemap") 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. "Sitemap") 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 GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFetchSitemapsResponseSitemapMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDiscoveryengineV1alphaFieldConfig: Configurations for fields of a // schema. For example, configuring a field is indexable, or searchable. type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { @@ -10809,7 +10864,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec struct { QueryId string `json:"queryId,omitempty"` // SearchResultPersistenceCount: The number of top search results to persist. // The persisted search results can be used for the subsequent /answer api - // call. This field is simliar to the `summary_result_count` field in + // call. This field is similar to the `summary_result_count` field in // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 // results for documents mode, or 50 for chunks mode. SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` @@ -11571,9 +11626,10 @@ type GoogleCloudDiscoveryengineV1betaAdvancedCompleteQueryRequest struct { // prefix" feature, which returns user's recently searched queries given the // empty query. Query string `json:"query,omitempty"` - // QueryModel: Specifies the autocomplete data model. This overrides any model - // specified in the Configuration > Autocomplete section of the Cloud console. - // Currently supported values: * `document` - Using suggestions generated from + // QueryModel: Specifies the autocomplete query model, which only applies to + // the QUERY SuggestionType. This overrides any model specified in the + // Configuration > Autocomplete section of the Cloud console. Currently + // supported values: * `document` - Using suggestions generated from // user-imported documents. * `search-history` - Using suggestions generated // from the past history of SearchService.Search API calls. Do not use it when // there is no traffic for Search API. * `user-event` - Using suggestions @@ -12076,12 +12132,15 @@ func (s *GoogleCloudDiscoveryengineV1betaAnswer) UnmarshalJSON(data []byte) erro // GoogleCloudDiscoveryengineV1betaAnswerCitation: Citation info for a segment. type GoogleCloudDiscoveryengineV1betaAnswerCitation struct { - // EndIndex: End of the attributed segment, exclusive. + // EndIndex: End of the attributed segment, exclusive. Measured in bytes (UTF-8 + // unicode). If there are multi-byte characters,such as non-ASCII characters, + // the index measurement is longer than the string length. EndIndex int64 `json:"endIndex,omitempty,string"` // Sources: Citation sources for the attributed segment. Sources []*GoogleCloudDiscoveryengineV1betaAnswerCitationSource `json:"sources,omitempty"` // StartIndex: Index indicates the start of the segment, measured in bytes - // (UTF-8 unicode). + // (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII + // characters, the index measurement is longer than the string length. StartIndex int64 `json:"startIndex,omitempty,string"` // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with empty or @@ -13205,6 +13264,10 @@ type GoogleCloudDiscoveryengineV1betaAnswerReferenceStructuredDocumentInfo struc Document string `json:"document,omitempty"` // StructData: Structured search data. StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Output only. The title of the document. + Title string `json:"title,omitempty"` + // Uri: Output only. The URI of the document. + Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -15110,6 +15173,29 @@ func (s GoogleCloudDiscoveryengineV1betaConverseConversationResponse) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries: The historical crawl +// rate timeseries data, used for monitoring. +type GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries struct { + // QpsTimeSeries: The QPS of the crawl rate. + QpsTimeSeries *GoogleMonitoringV3TimeSeries `json:"qpsTimeSeries,omitempty"` + // ForceSendFields is a list of field names (e.g. "QpsTimeSeries") 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. "QpsTimeSeries") 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 GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to // the progress of the DataStoreService.CreateDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -15401,7 +15487,7 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // DefaultSchemaId: Output only. The id of the default Schema associated to // this data store. DefaultSchemaId string `json:"defaultSchemaId,omitempty"` // DisplayName: Required. The data store display name. This field must be a @@ -15414,6 +15500,12 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // HealthcareFhirConfig: Optional. Configuration for `HEALTHCARE_FHIR` // vertical. HealthcareFhirConfig *GoogleCloudDiscoveryengineV1betaHealthcareFhirConfig `json:"healthcareFhirConfig,omitempty"` + // IdentityMappingStore: Immutable. The fully qualified resource name of the + // associated IdentityMappingStore. This field can only be set for acl_enabled + // DataStores with `THIRD_PARTY` or `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapp + // ing_store}`. + IdentityMappingStore string `json:"identityMappingStore,omitempty"` // IndustryVertical: Immutable. The industry vertical that the data store // registers. // @@ -15552,6 +15644,38 @@ func (s GoogleCloudDiscoveryengineV1betaDataStoreServingConfigDataStore) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries: The historical +// dedicated crawl rate timeseries data, used for monitoring. Dedicated crawl +// is used by Vertex AI to crawl the user's website when dedicate crawl is set. +type GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries struct { + // AutoRefreshCrawlRate: Vertex AI's dedicated crawl rate time series of + // auto-refresh, which is the crawl rate of Google-CloudVertexBot when dedicate + // crawl is set, and the crawl rate is for best effort use cases like + // refreshing urls periodically. + AutoRefreshCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"autoRefreshCrawlRate,omitempty"` + // UserTriggeredCrawlRate: Vertex AI's dedicated crawl rate time series of user + // triggered crawl, which is the crawl rate of Google-CloudVertexBot when + // dedicate crawl is set, and user triggered crawl rate is for deterministic + // use cases like crawling urls or sitemaps specified by users. + UserTriggeredCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"userTriggeredCrawlRate,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoRefreshCrawlRate") 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. "AutoRefreshCrawlRate") 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 GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata related to // the progress of the DataStoreService.DeleteDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -18976,6 +19100,108 @@ func (s GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaObtainCrawlRateRequest: Request message for +// CrawlRateManagementService.ObtainCrawlRate method. +type GoogleCloudDiscoveryengineV1betaObtainCrawlRateRequest struct { + // CrawlRateScope: Required. The scope of the crawl rate that the user wants to + // monitor. Currently, only domain and host name are supported. A domain name + // example: `example.com`. A host name example: `www.example.com`. Please do + // not include `/` in the domain or host name. + CrawlRateScope string `json:"crawlRateScope,omitempty"` + // ForceSendFields is a list of field names (e.g. "CrawlRateScope") 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. "CrawlRateScope") 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 GoogleCloudDiscoveryengineV1betaObtainCrawlRateRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaObtainCrawlRateRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse: Response message +// for CrawlRateManagementService.ObtainCrawlRate method. The response contains +// organcic or dedicated crawl rate time series data for monitoring, depending +// on whether dedicated crawl rate is set. +type GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse struct { + // DedicatedCrawlRateTimeSeries: The historical dedicated crawl rate timeseries + // data, used for monitoring. + DedicatedCrawlRateTimeSeries *GoogleCloudDiscoveryengineV1betaDedicatedCrawlRateTimeSeries `json:"dedicatedCrawlRateTimeSeries,omitempty"` + // Error: Errors from service when handling the request. + Error *GoogleRpcStatus `json:"error,omitempty"` + // OrganicCrawlRateTimeSeries: The historical organic crawl rate timeseries + // data, used for monitoring. + OrganicCrawlRateTimeSeries *GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries `json:"organicCrawlRateTimeSeries,omitempty"` + // State: Output only. The state of the response. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "SUCCEEDED" - The state is successful. + // "FAILED" - The state is failed. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. + // "DedicatedCrawlRateTimeSeries") 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. "DedicatedCrawlRateTimeSeries") 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 GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries: The historical +// organic crawl rate timeseries data, used for monitoring. Organic crawl is +// auto-determined by Google to crawl the user's website when dedicate crawl is +// not set. Crawl rate is the QPS of crawl request Google sends to the user's +// website. +type GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries struct { + // GoogleOrganicCrawlRate: Google's organic crawl rate time series, which is + // the sum of all googlebots' crawl rate. Please refer to + // https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers + // for more details about googlebots. + GoogleOrganicCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"googleOrganicCrawlRate,omitempty"` + // VertexAiOrganicCrawlRate: Vertex AI's organic crawl rate time series, which + // is the crawl rate of Google-CloudVertexBot when dedicate crawl is not set. + // Please refer to + // https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot + // for more details about Google-CloudVertexBot. + VertexAiOrganicCrawlRate *GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries `json:"vertexAiOrganicCrawlRate,omitempty"` + // ForceSendFields is a list of field names (e.g. "GoogleOrganicCrawlRate") 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. "GoogleOrganicCrawlRate") 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 GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaPageInfo: Detailed page information. type GoogleCloudDiscoveryengineV1betaPageInfo struct { // PageCategory: The most specific category associated with a category page. To @@ -19925,6 +20151,145 @@ func (s GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata: Metadata +// related to the progress of the +// CrawlRateManagementService.RemoveDedicatedCrawlRate operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateRequest: Request +// message for CrawlRateManagementService.RemoveDedicatedCrawlRate method. The +// user can remove the dedicated crawl rate for a crawl_rate_scope they own, +// and Google will fall back to organic crawl, and the crawl rate will be +// determined by Google. +type GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateRequest struct { + // CrawlRateScope: Required. The scope of the crawl rate change. Currently, + // only domain and host name are supported. A domain name example: + // `example.com`. A host name example: `www.example.com`. Please do not include + // `/` in the domain or host name. + CrawlRateScope string `json:"crawlRateScope,omitempty"` + // ForceSendFields is a list of field names (e.g. "CrawlRateScope") 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. "CrawlRateScope") 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 GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse: Response +// message for CrawlRateManagementService.RemoveDedicatedCrawlRate method. It +// simply returns the state of the response, and an error message if the state +// is FAILED. +type GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse struct { + // Error: Errors from service when handling the request. + Error *GoogleRpcStatus `json:"error,omitempty"` + // State: Output only. The state of the response. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "SUCCEEDED" - The state is successful. + // "FAILED" - The state is failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRemoveSuggestionRequest: Request message for +// CompletionService.RemoveSuggestion method. +type GoogleCloudDiscoveryengineV1betaRemoveSuggestionRequest struct { + // RemoveAllSearchHistorySuggestions: Remove all search history suggestions for + // the user. + RemoveAllSearchHistorySuggestions bool `json:"removeAllSearchHistorySuggestions,omitempty"` + // RemoveTime: Optional. Time at which the suggestion was removed. If not set, + // the current time will be used. + RemoveTime string `json:"removeTime,omitempty"` + // SearchHistorySuggestion: The search history suggestion to be removed. + SearchHistorySuggestion string `json:"searchHistorySuggestion,omitempty"` + // UserInfo: Optional. Information about the end user. This should be the same + // identifier information as UserEvent.user_info and SearchRequest.user_info. + UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + // UserPseudoId: Required. A unique identifier for tracking visitors. For + // example, this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique identifier + // should not change if the visitor logs in or out of the website. This field + // should NOT have a fixed value such as `unknown_visitor`. This should be the + // same identifier as UserEvent.user_pseudo_id and + // SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with + // a length limit of 128. + UserPseudoId string `json:"userPseudoId,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RemoveAllSearchHistorySuggestions") 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. + // "RemoveAllSearchHistorySuggestions") 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 GoogleCloudDiscoveryengineV1betaRemoveSuggestionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRemoveSuggestionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRemoveSuggestionResponse: Response message +// for CompletionService.RemoveSuggestion method. +type GoogleCloudDiscoveryengineV1betaRemoveSuggestionResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + // GoogleCloudDiscoveryengineV1betaReply: Defines a reply message to user. type GoogleCloudDiscoveryengineV1betaReply struct { // References: References in the reply. @@ -21454,7 +21819,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec struct { QueryId string `json:"queryId,omitempty"` // SearchResultPersistenceCount: The number of top search results to persist. // The persisted search results can be used for the subsequent /answer api - // call. This field is simliar to the `summary_result_count` field in + // call. This field is similar to the `summary_result_count` field in // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 // results for documents mode, or 50 for chunks mode. SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` @@ -22715,6 +23080,122 @@ func (s GoogleCloudDiscoveryengineV1betaSessionTurn) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata: Metadata +// related to the progress of the +// CrawlRateManagementService.SetDedicatedCrawlRate operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // 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 GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateRequest: Request +// message for CrawlRateManagementService.SetDedicatedCrawlRate method. The +// user can set the crawl rate for a crawl_rate_scope they own. They can set up +// an overall crawl rate, or set up a user-triggered crawl rate and a +// auto-refresh crawl rate separately. If an overall crawl rate is set, Vertex +// AI will automatically splits crawl_rate into user-triggered and +// auto-refresh. +type GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateRequest struct { + // CrawlRate: Optional. The crawl QPS set by the user. It is not guaranteed + // that Vertex crawl bot will crawl at this QPS. If the crawl rate is too high, + // the real QPS may be lower than the value set by the user to avoid + // overloading the user's website. + CrawlRate int64 `json:"crawlRate,omitempty"` + // CrawlRateScope: Required. The scope of the crawl rate that the user wants to + // config. Currently, only domain and host name are supported. A domain name + // example: `example.com`. A host name example: `www.example.com`. Please do + // not include `/` in the domain or host name. + CrawlRateScope string `json:"crawlRateScope,omitempty"` + // CrawlType: Optional. Whether it's the crawl rate of user-triggered or + // auto-refresh. + // + // Possible values: + // "CRAWL_TYPE_UNSPECIFIED" - The crawl type is unspecified. + // "USER_TRIGGERED" - The crawl type is user-triggered. + // "AUTO_REFRESH" - The crawl type is auto-refresh. + CrawlType string `json:"crawlType,omitempty"` + // Mode: Optional. Whether the rate is explicitly set by users, or set by + // vertex AI. + // + // Possible values: + // "MODE_UNSPECIFIED" - The mode is unspecified. If the user does not specify + // the mode, default to AUTOMATIC. + // "AUTOMATIC" - Vertex AI automatically splits crawl_rate into + // user-triggered and auto-refresh. Users don't need to specify + // SetDedicatedCrawlRateRequest.CrawlType if the mode is AUTOMATIC. + // "EXPLICIT" - Users explicitly set user-triggered or auto-refresh crawl + // rate. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "CrawlRate") 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. "CrawlRate") 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 GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse: Response +// message for CrawlRateManagementService.SetDedicatedCrawlRate method. It +// simply returns the state of the response, and an error message if the state +// is FAILED. +type GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse struct { + // Error: Errors from service when handling the request. + Error *GoogleRpcStatus `json:"error,omitempty"` + // State: Output only. The state of the response. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "SUCCEEDED" - The state is successful. + // "FAILED" - The state is failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Error") 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. "Error") 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 GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSingleRegionKey: Metadata for // single-regional CMEKs. type GoogleCloudDiscoveryengineV1betaSingleRegionKey struct { @@ -24243,6 +24724,334 @@ func (c *ProjectsLocationsGenerateGroundedContentCall) Do(opts ...googleapi.Call return ret, nil } +type ProjectsLocationsObtainCrawlRateCall struct { + s *Service + location string + googleclouddiscoveryenginev1betaobtaincrawlraterequest *GoogleCloudDiscoveryengineV1betaObtainCrawlRateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ObtainCrawlRate: Obtains the time series data of organic or dedicated crawl +// rate for monitoring. When dedicated crawl rate is not set, it will return +// vertex AI's organic crawl rate time series. Organic crawl means Google +// automatically crawl the internet at its own convenience. When dedicated +// crawl rate is set, it will return vertex AI's dedicated crawl rate time +// series. +// +// - location: The location resource where crawl rate management will be +// performed. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) ObtainCrawlRate(location string, googleclouddiscoveryenginev1betaobtaincrawlraterequest *GoogleCloudDiscoveryengineV1betaObtainCrawlRateRequest) *ProjectsLocationsObtainCrawlRateCall { + c := &ProjectsLocationsObtainCrawlRateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1betaobtaincrawlraterequest = googleclouddiscoveryenginev1betaobtaincrawlraterequest + 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 *ProjectsLocationsObtainCrawlRateCall) Fields(s ...googleapi.Field) *ProjectsLocationsObtainCrawlRateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObtainCrawlRateCall) Context(ctx context.Context) *ProjectsLocationsObtainCrawlRateCall { + 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 *ProjectsLocationsObtainCrawlRateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObtainCrawlRateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1betaobtaincrawlraterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+location}:obtainCrawlRate") + 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{ + "location": c.location, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.obtainCrawlRate", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.obtainCrawlRate" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse.ServerResponse.Heade +// r 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 *ProjectsLocationsObtainCrawlRateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse, 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 := &GoogleCloudDiscoveryengineV1betaObtainCrawlRateResponse{ + 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", "discoveryengine.projects.locations.obtainCrawlRate", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsRemoveDedicatedCrawlRateCall struct { + s *Service + location string + googleclouddiscoveryenginev1betaremovededicatedcrawlraterequest *GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveDedicatedCrawlRate: Removes the dedicated crawl rate for a +// craw_rate_scope. If the dedicated crawl rate was set, this will disable +// vertex AI's crawl bot from using the dedicated crawl rate for crawling. If +// the dedicated crawl rate was not set, this is a no-op. +// +// - location: The location resource where crawl rate management will be +// performed. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) RemoveDedicatedCrawlRate(location string, googleclouddiscoveryenginev1betaremovededicatedcrawlraterequest *GoogleCloudDiscoveryengineV1betaRemoveDedicatedCrawlRateRequest) *ProjectsLocationsRemoveDedicatedCrawlRateCall { + c := &ProjectsLocationsRemoveDedicatedCrawlRateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1betaremovededicatedcrawlraterequest = googleclouddiscoveryenginev1betaremovededicatedcrawlraterequest + 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 *ProjectsLocationsRemoveDedicatedCrawlRateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRemoveDedicatedCrawlRateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRemoveDedicatedCrawlRateCall) Context(ctx context.Context) *ProjectsLocationsRemoveDedicatedCrawlRateCall { + 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 *ProjectsLocationsRemoveDedicatedCrawlRateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRemoveDedicatedCrawlRateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1betaremovededicatedcrawlraterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+location}:removeDedicatedCrawlRate") + 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{ + "location": c.location, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.removeDedicatedCrawlRate", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.removeDedicatedCrawlRate" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsRemoveDedicatedCrawlRateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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", "discoveryengine.projects.locations.removeDedicatedCrawlRate", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + +type ProjectsLocationsSetDedicatedCrawlRateCall struct { + s *Service + location string + googleclouddiscoveryenginev1betasetdedicatedcrawlraterequest *GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetDedicatedCrawlRate: Sets the dedicated crawl rate for a crawl_rate_scope. +// If the dedicated crawl rate was not set, this will enable vertex AI's crawl +// bot to use the new dedicated crawl rate for crawling. If the dedicated crawl +// rate was set, vertex AI's crawl bot will try to update the rate to the new +// value. If the new value is too high, the crawl bot may crawl at a lower rate +// to avoid overloading the user's website. +// +// - location: The location resource where crawl rate management will be +// performed. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) SetDedicatedCrawlRate(location string, googleclouddiscoveryenginev1betasetdedicatedcrawlraterequest *GoogleCloudDiscoveryengineV1betaSetDedicatedCrawlRateRequest) *ProjectsLocationsSetDedicatedCrawlRateCall { + c := &ProjectsLocationsSetDedicatedCrawlRateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1betasetdedicatedcrawlraterequest = googleclouddiscoveryenginev1betasetdedicatedcrawlraterequest + 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 *ProjectsLocationsSetDedicatedCrawlRateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSetDedicatedCrawlRateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSetDedicatedCrawlRateCall) Context(ctx context.Context) *ProjectsLocationsSetDedicatedCrawlRateCall { + 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 *ProjectsLocationsSetDedicatedCrawlRateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSetDedicatedCrawlRateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1betasetdedicatedcrawlraterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+location}:setDedicatedCrawlRate") + 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{ + "location": c.location, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.setDedicatedCrawlRate", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.setDedicatedCrawlRate" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsSetDedicatedCrawlRateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 := &GoogleLongrunningOperation{ + 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", "discoveryengine.projects.locations.setDedicatedCrawlRate", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { s *Service name string @@ -35562,6 +36371,117 @@ func (c *ProjectsLocationsCollectionsEnginesCompletionConfigCompleteQueryCall) D return ret, nil } +type ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall struct { + s *Service + completionConfig string + googleclouddiscoveryenginev1betaremovesuggestionrequest *GoogleCloudDiscoveryengineV1betaRemoveSuggestionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveSuggestion: Removes the search history suggestion in an engine for a +// user. This will remove the suggestion from being returned in the +// AdvancedCompleteQueryResponse.recent_search_suggestions for this user. If +// the user searches the same suggestion again, the new history will override +// and suggest this suggestion again. +// +// - completionConfig: The completion_config of the parent engine resource name +// for which the search history suggestion is to be removed, such as +// `projects/*/locations/global/collections/default_collection/engines/*/compl +// etionConfig`. +func (r *ProjectsLocationsCollectionsEnginesCompletionConfigService) RemoveSuggestion(completionConfig string, googleclouddiscoveryenginev1betaremovesuggestionrequest *GoogleCloudDiscoveryengineV1betaRemoveSuggestionRequest) *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall { + c := &ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.completionConfig = completionConfig + c.googleclouddiscoveryenginev1betaremovesuggestionrequest = googleclouddiscoveryenginev1betaremovesuggestionrequest + 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 *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall { + 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 *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleclouddiscoveryenginev1betaremovesuggestionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+completionConfig}:removeSuggestion") + 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{ + "completionConfig": c.completionConfig, + }) + c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "discoveryengine.projects.locations.collections.engines.completionConfig.removeSuggestion", "request", internallog.HTTPRequest(req, body.Bytes())) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.completionConfig.removeSuggestion" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaRemoveSuggestionResponse.ServerResponse.Head +// er 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 *ProjectsLocationsCollectionsEnginesCompletionConfigRemoveSuggestionCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRemoveSuggestionResponse, 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 := &GoogleCloudDiscoveryengineV1betaRemoveSuggestionResponse{ + 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", "discoveryengine.projects.locations.collections.engines.completionConfig.removeSuggestion", "response", internallog.HTTPResponse(res, b)) + return ret, nil +} + type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { s *Service parent string diff --git a/forms/v1/forms-api.json b/forms/v1/forms-api.json index fd432ebed02..b6088b9f34e 100644 --- a/forms/v1/forms-api.json +++ b/forms/v1/forms-api.json @@ -423,7 +423,7 @@ } } }, - "revision": "20250121", + "revision": "20250211", "rootUrl": "https://forms.googleapis.com/", "schemas": { "Answer": { @@ -864,7 +864,7 @@ "id": "FormSettings", "properties": { "emailCollectionType": { - "description": "Optional. Kind of email collection configured in the form.", + "description": "Optional. The setting that determines whether the form collects email addresses from respondents.", "enum": [ "EMAIL_COLLECTION_TYPE_UNSPECIFIED", "DO_NOT_COLLECT", @@ -872,10 +872,10 @@ "RESPONDER_INPUT" ], "enumDescriptions": [ - "Default value. The default for forms owned by Google Workspace users is VERIFIED. For forms owned by other types of Google accounts, the default is DO_NO_COLLECT.", - "Email Field is not collected for the user.", - "Email Field is collected automatically from the logged in user.", - "Email Field needs to be manually filled." + "Unspecified. This value is unused.", + "The form doesn't collect email addresses. Default value if the form owner uses a Google account.", + "The form collects email addresses automatically based on the account of the signed-in user. Default value if the form owner uses a Google Workspace account.", + "The form collects email addresses using a field that the respondent completes on the form." ], "type": "string" }, diff --git a/forms/v1/forms-gen.go b/forms/v1/forms-gen.go index 1c1e8b39465..6522fd144b6 100644 --- a/forms/v1/forms-gen.go +++ b/forms/v1/forms-gen.go @@ -805,17 +805,18 @@ func (s *FormResponse) UnmarshalJSON(data []byte) error { // FormSettings: A form's settings. type FormSettings struct { - // EmailCollectionType: Optional. Kind of email collection configured in the - // form. + // EmailCollectionType: Optional. The setting that determines whether the form + // collects email addresses from respondents. // // Possible values: - // "EMAIL_COLLECTION_TYPE_UNSPECIFIED" - Default value. The default for forms - // owned by Google Workspace users is VERIFIED. For forms owned by other types - // of Google accounts, the default is DO_NO_COLLECT. - // "DO_NOT_COLLECT" - Email Field is not collected for the user. - // "VERIFIED" - Email Field is collected automatically from the logged in - // user. - // "RESPONDER_INPUT" - Email Field needs to be manually filled. + // "EMAIL_COLLECTION_TYPE_UNSPECIFIED" - Unspecified. This value is unused. + // "DO_NOT_COLLECT" - The form doesn't collect email addresses. Default value + // if the form owner uses a Google account. + // "VERIFIED" - The form collects email addresses automatically based on the + // account of the signed-in user. Default value if the form owner uses a Google + // Workspace account. + // "RESPONDER_INPUT" - The form collects email addresses using a field that + // the respondent completes on the form. EmailCollectionType string `json:"emailCollectionType,omitempty"` // QuizSettings: Settings related to quiz forms and grading. QuizSettings *QuizSettings `json:"quizSettings,omitempty"` diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index 623dd92cfba..f46b68eb996 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -1417,7 +1417,7 @@ } } }, - "revision": "20250208", + "revision": "20250215", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Accepted": { @@ -2830,7 +2830,7 @@ "type": "object" }, "Program": { - "description": "Defines participation in a given program for the specified account. Programs provide a mechanism for adding functionality to merchant accounts. A typical example of this is the [Free product listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,\u0026sjid=796648681813264022-EU) program, which enables products from a merchant's store to be shown across Google for free.", + "description": "Defines participation in a given program for the specified account. Programs provide a mechanism for adding functionality to merchant accounts. A typical example of this is the [Free product listings](https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,\u0026sjid=796648681813264022-EU) program, which enables products from a merchant's store to be shown across Google for free. The following list is the available set of program resource IDs accessible through the API: * `free-listings` * `shopping-ads` * `youtube-shopping-checkout`", "id": "Program", "properties": { "activeRegionCodes": { @@ -3420,7 +3420,7 @@ "id": "User", "properties": { "accessRights": { - "description": "Optional. The [access rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) the user has.", + "description": "Required. The [access rights](https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) the user has.", "items": { "enum": [ "ACCESS_RIGHT_UNSPECIFIED", diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index 04a00653fd3..9404fc2423b 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -2180,7 +2180,9 @@ func (s ProductStatusChangeMessage) MarshalJSON() ([]byte, error) { // A typical example of this is the Free product listings // (https://support.google.com/merchants/topic/9240261?ref_topic=7257954,7259405,&sjid=796648681813264022-EU) // program, which enables products from a merchant's store to be shown across -// Google for free. +// Google for free. The following list is the available set of program resource +// IDs accessible through the API: * `free-listings` * `shopping-ads` * +// `youtube-shopping-checkout` type Program struct { // ActiveRegionCodes: Output only. The regions in which the account is actively // participating in the program. Active regions are defined as those where all @@ -2964,7 +2966,7 @@ type UnclaimHomepageRequest struct { // account. For more information, see Frequently asked questions about people // and access levels (//support.google.com/merchants/answer/12160472). type User struct { - // AccessRights: Optional. The access rights + // AccessRights: Required. The access rights // (https://support.google.com/merchants/answer/12160472?sjid=6789834943175119429-EU#accesstypes) // the user has. // diff --git a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json index e84e53ca552..2621438ac0b 100644 --- a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json +++ b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-api.json @@ -612,7 +612,7 @@ } } }, - "revision": "20241120", + "revision": "20250217", "rootUrl": "https://mybusinessbusinessinformation.googleapis.com/", "schemas": { "AdWordsLocationExtensions": { @@ -1198,7 +1198,8 @@ "type": "boolean" }, "canOperateLocalPost": { - "description": "Output only. Indicates if the listing can manage local posts.", + "deprecated": true, + "description": "Output only. Indicates if the listing can manage local posts. Deprecated: This field is no longer populated and will be removed in a future version.", "readOnly": true, "type": "boolean" }, diff --git a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go index 70b62c6ab7b..82bb59a2df7 100644 --- a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go +++ b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go @@ -1055,7 +1055,8 @@ type Metadata struct { // operate on Health data. CanOperateHealthData bool `json:"canOperateHealthData,omitempty"` // CanOperateLocalPost: Output only. Indicates if the listing can manage local - // posts. + // posts. Deprecated: This field is no longer populated and will be removed in + // a future version. CanOperateLocalPost bool `json:"canOperateLocalPost,omitempty"` // CanOperateLodgingData: Output only. Indicates whether the location can // operate on Lodging data.